[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Fix base32 implementation; make base32 implementation follo...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] Fix base32 implementation; make base32 implementation follo...
- From: nickm@seul.org (Nick Mathewson)
- Date: Thu, 8 Apr 2004 16:56:35 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Thu, 08 Apr 2004 16:57:13 -0400
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
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);