diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-04-08 20:56:33 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-04-08 20:56:33 +0000 |
commit | aa7cfd93e53f5d2d01abbc81ce8ee6f6d27ec3c5 (patch) | |
tree | 6cee8a54f8800578928b3365d39288ee468808e5 /src/or/test.c | |
parent | d23769239651df818c70f26ab88d57fd712c25bc (diff) | |
download | tor-aa7cfd93e53f5d2d01abbc81ce8ee6f6d27ec3c5.tar tor-aa7cfd93e53f5d2d01abbc81ce8ee6f6d27ec3c5.tar.gz |
Fix base32 implementation; make base32 implementation follow standard; add more tests for base32
svn:r1574
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/or/test.c b/src/or/test.c index e81835f06..7c2190119 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -446,7 +446,13 @@ test_crypto() * 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); |