[or-cvs] Fix base32 implementation; make base32 implementation follo...
Nick Mathewson
nickm at seul.org
Thu Apr 8 20:56:35 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv20865/src/or
Modified Files:
test.c
Log Message:
Fix base32 implementation; make base32 implementation follow standard; add more tests for base32
Index: test.c
===================================================================
RCS file: /home/or/cvsroot/src/or/test.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- test.c 8 Apr 2004 20:22:01 -0000 1.78
+++ test.c 8 Apr 2004 20:56:33 -0000 1.79
@@ -446,7 +446,13 @@
* By 5s: [00110 10101 10001 10110 10000 11100 10011 10011]
*/
i = base32_encode(data2, 9, data1, 5);
- test_streq(data2, "gvrwq2tt");
+ test_streq(data2, "gvrwq4tt");
+
+ strcpy(data1, "\xFF\xF5\x6D\x44\xAE\x0D\x5C\xC9\x62\xC4");
+ printf("-------\n");
+ i = base32_encode(data2, 30, data1, 10);
+ test_eq(i,0);
+ test_streq(data2, "772w2rfobvomsywe");
free(data1);
free(data2);
More information about the tor-commits
mailing list