Revert "Revert "and added files""
[bcm963xx.git] / userapps / opensource / sshd / libtomcrypt / examples / ch1-03.c
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