vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

sha_main.c (375B)


      1 #include <stdio.h>
      2 #include <string.h>
      3 #include <errno.h>
      4 #include "sha1.h"
      5 
      6 int
      7 main( int   argc,
      8       char *argv[] )
      9 {
     10   unsigned char output[20];
     11   int i;
     12 
     13   if ( sha_stream( stdin, output ) != 0 ) {
     14     fprintf( stderr, "error reading stdin: errno=%i", errno );
     15     return 1;
     16   }
     17 
     18   for ( i = 0; i < sizeof( output ); i++ )
     19     printf("%02x", output[i]);
     20 
     21   return 0;
     22 }