comparison testprof/base64_test.c @ 209:39d5d58461d6 libtomcrypt-orig LTC_1.05

Import of libtomcrypt 1.05
author Matt Johnston <matt@ucc.asn.au>
date Wed, 06 Jul 2005 03:53:40 +0000
parents 1c15b283127b
children
comparison
equal deleted inserted replaced
191:1c15b283127b 209:39d5d58461d6
10 l1 = sizeof(out); 10 l1 = sizeof(out);
11 DO(base64_encode(in, x, out, &l1)); 11 DO(base64_encode(in, x, out, &l1));
12 l2 = sizeof(tmp); 12 l2 = sizeof(tmp);
13 DO(base64_decode(out, l1, tmp, &l2)); 13 DO(base64_decode(out, l1, tmp, &l2));
14 if (l2 != x || memcmp(tmp, in, x)) { 14 if (l2 != x || memcmp(tmp, in, x)) {
15 printf("base64 failed %lu %lu %lu", x, l1, l2); 15 fprintf(stderr, "base64 failed %lu %lu %lu", x, l1, l2);
16 return 1; 16 return 1;
17 } 17 }
18 } 18 }
19 return 0; 19 return 0;
20 } 20 }
21
22 /* $Source: /cvs/libtom/libtomcrypt/testprof/base64_test.c,v $ */
23 /* $Revision: 1.5 $ */
24 /* $Date: 2005/05/21 12:51:25 $ */