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

Go to the documentation of this file.
00001 /* SVN FILE INFO
00002  * $Revision: 174 $ : Last Committed Revision
00003  * $Date: 2008-06-24 10:50:29 -0700 (Tue, 24 Jun 2008) $ : Last Committed Date */
00007 #ifndef _SHA1_H
00008 #define _SHA1_H
00009 
00010 #ifdef __cplusplus
00011 extern "C" {
00012 #endif
00013 
00017 typedef struct
00018 {
00019     unsigned long total[2];     
00020     unsigned long state[5];     
00021     unsigned char buffer[64];   
00022     unsigned char ipad[64];     
00023     unsigned char opad[64];     
00024 }
00025 sha1_context;
00026 
00032 void sha1_starts( sha1_context *ctx );
00033 
00041 void sha1_update( sha1_context *ctx, unsigned char *input, int ilen );
00042 
00049 void sha1_finish( sha1_context *ctx, unsigned char *output );
00050 
00058 void sha1( unsigned char *input, int ilen,
00059            unsigned char *output );
00060 
00070 int sha1_file( char *path, unsigned char *output );
00071 
00079 void sha1_hmac_starts( sha1_context *ctx,
00080                        unsigned char *key, int keylen );
00081 
00089 void sha1_hmac_update( sha1_context *ctx,
00090                        unsigned char *input, int ilen );
00091 
00098 void sha1_hmac_finish( sha1_context *ctx, unsigned char *output );
00099 
00109 void sha1_hmac( unsigned char *key, int keylen,
00110                 unsigned char *input, int ilen,
00111                 unsigned char *output );
00112 
00118 int sha1_self_test( int verbose );
00119 
00120 #ifdef __cplusplus
00121 }
00122 #endif
00123 
00124 #endif /* sha1.h */

Generated on Tue Jul 1 15:29:58 2008 for Mobile-C by  doxygen 1.5.4