/home/dko/projects/mobilec/trunk/src/security/xyssl-0.7/include/xyssl/sha1.h

Go to the documentation of this file.
00001 
00004 #ifndef _SHA1_H
00005 #define _SHA1_H
00006 
00007 #ifdef __cplusplus
00008 extern "C" {
00009 #endif
00010 
00014 typedef struct
00015 {
00016     unsigned long total[2];     
00017     unsigned long state[5];     
00018     unsigned char buffer[64];   
00019     unsigned char ipad[64];     
00020     unsigned char opad[64];     
00021 }
00022 sha1_context;
00023 
00029 void sha1_starts( sha1_context *ctx );
00030 
00038 void sha1_update( sha1_context *ctx, unsigned char *input, int ilen );
00039 
00046 void sha1_finish( sha1_context *ctx, unsigned char *output );
00047 
00055 void sha1( unsigned char *input, int ilen,
00056            unsigned char *output );
00057 
00067 int sha1_file( char *path, unsigned char *output );
00068 
00076 void sha1_hmac_starts( sha1_context *ctx,
00077                        unsigned char *key, int keylen );
00078 
00086 void sha1_hmac_update( sha1_context *ctx,
00087                        unsigned char *input, int ilen );
00088 
00095 void sha1_hmac_finish( sha1_context *ctx, unsigned char *output );
00096 
00106 void sha1_hmac( unsigned char *key, int keylen,
00107                 unsigned char *input, int ilen,
00108                 unsigned char *output );
00109 
00115 int sha1_self_test( int verbose );
00116 
00117 #ifdef __cplusplus
00118 }
00119 #endif
00120 
00121 #endif /* sha1.h */

Generated on Fri May 16 14:49:55 2008 for Mobile-C by  doxygen 1.5.4