Mercurial > dropbear
comparison examples/ch1-03.c @ 0:d7da3b1e1540 libtomcrypt
put back the 0.95 makefile which was inadvertently merged over
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 31 May 2004 18:21:40 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d7da3b1e1540 |
---|---|
1 /* | |
2 * Name : ch1-03.c | |
3 * Purpose : Demonstration of variable length outputs | |
4 * Author : Tom St Denis | |
5 * | |
6 * History : v0.79 Initial release | |
7 */ | |
8 | |
9 /* ch1-01-1 */ | |
10 #include <mycrypt.h> | |
11 | |
12 int main(void) | |
13 { | |
14 unsigned long length; | |
15 unsigned char buffer[512]; | |
16 int errno; | |
17 | |
18 length = sizeof(buffer); | |
19 if ((errno = some_func(..., buffer, &length)) != CRYPT_OK) { | |
20 printf("Error: %s\n", error_to_string(errno)); | |
21 return EXIT_FAILURE; | |
22 } | |
23 printf("Size of output is %lu bytes\n", length); | |
24 return 0; | |
25 } | |
26 /* ch1-01-1 */ | |
27 | |
28 | |
29 |