sha1.h

00001 /*
00002  SHA-1 in C
00003 
00004  By Steve Reid <steve@edmweb.com>, with small changes to make it
00005  fit by Bruce Guenter <bruce@untroubled.org>
00006 
00007 */
00008 
00009 #ifndef _SHA1_H
00010 # define _SHA1_H
00011 
00012 #include <sysdeps.h>
00013 
00014 #define SHA1_DIGEST_LENGTH 20
00015 #define SHA1_BLOCK_LENGTH 64
00016 
00017 typedef struct {
00018   uint32 state[5];
00019   uint64 bytes;
00020   unsigned char buffer[SHA1_BLOCK_LENGTH];
00021 } SHA1_CTX;
00022 
00023 void SHA1Transform(uint32 state[5], const unsigned char buffer[SHA1_BLOCK_LENGTH]);
00024 void SHA1Init(SHA1_CTX* context);
00025 void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32 len);
00026 void SHA1Final(SHA1_CTX* context, unsigned char digest[SHA1_DIGEST_LENGTH]);
00027 
00028 # define SHA1_Transform SHA1Transform
00029 # define SHA1_Init SHA1Init
00030 # define SHA1_Update SHA1Update
00031 # define SHA1_Final SHA1Final
00032 
00033 #endif
00034 

Generated on Thu Feb 19 11:11:50 2009 for bglibs by  doxygen 1.5.4