Go to the documentation of this file.00001
00006 #ifndef _SHA1_H
00007 #define _SHA1_H
00008
00009 #ifdef __cplusplus
00010 extern "C" {
00011 #endif
00012
00025 #define SHA1_BLOCK_LENGTH 64
00026 #define SHA1_DIGEST_LENGTH 20
00027 #define SHA1_DIGEST_STRING_LENGTH (SHA1_DIGEST_LENGTH * 2 + 1)
00028
00029 typedef struct {
00030 uint32_t state[5];
00031 uint64_t count;
00032 uint8_t buffer[SHA1_BLOCK_LENGTH];
00033 } SHA1_CTX;
00034
00035 void SHA1Init(SHA1_CTX *);
00036 void SHA1Pad(SHA1_CTX *);
00037 void SHA1Transform(uint32_t [5], const uint8_t [SHA1_BLOCK_LENGTH]);
00038 void SHA1Update(SHA1_CTX *, const uint8_t *, size_t);
00039 void SHA1Final(uint8_t [SHA1_DIGEST_LENGTH], SHA1_CTX *);
00040
00043 #ifdef __cplusplus
00044 }
00045 #endif
00046
00047 #endif