Main Page   Compound List   File List   Compound Members   File Members  

sha1.h

Go to the documentation of this file.
00001 
00014 #ifndef SHA1_H
00015 #define SHA1_H
00016 
00017 #include "hashcom.h"
00018 
00019 #ifndef SHA1_SMALL
00020   #define SHA1_SMALL   0  /* low footprint sha-1 */
00021 #endif
00022 
00023 #define SHA1_DIGEST_SIZE   20
00024 
00025 typedef struct {
00026   uns32 state[5];
00027   char buf[64];
00028   uns32 count[2];
00029 } sha1_context;
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 
00035 #ifdef WIN32
00036  #ifdef CRYPTO_EXPORTS
00037    #define extern   extern __declspec(dllexport)
00038  #else
00039    #define extern   extern __declspec(dllimport)
00040  #endif
00041 #endif
00042 
00043 extern void sha1_init(sha1_context *c);
00044 extern void sha1_update(sha1_context *c, uns8 *input, unsigned int inLen);
00045 extern void sha1_final(uns8 *digest, sha1_context *c);
00046 
00047 #ifdef __cplusplus
00048 }
00049 #endif
00050 
00051 #ifdef WIN32
00052   #undef extern
00053 #endif
00054 
00055 /*
00056 sha1(abc) = a9993e364706816aba3e25717850c26c9cd0d89d
00057 */
00058 
00059 #endif


Confidential