X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=sha1.h;fp=sha1.h;h=ea0b4db50d3602cd51816461d7fbfe7f65c7b389;hb=aabf2c1bd3e37fb70b674dba243f927069909534;hp=0000000000000000000000000000000000000000;hpb=cfbbd6655346497ab28d50d2b5c34f0c5d9ce5ce;p=onak.git diff --git a/sha1.h b/sha1.h new file mode 100644 index 0000000..ea0b4db --- /dev/null +++ b/sha1.h @@ -0,0 +1,33 @@ +/* + SHA-1 in C + + By Steve Reid , with small changes to make it + fit into mutt by Thomas Roessler . + +*/ + +#ifndef _SHA1_H +# define _SHA1_H + +#include + +typedef struct { + u_int32_t state[5]; + u_int32_t count[2]; + unsigned char buffer[64]; +} SHA1_CTX; + +void SHA1Transform(u_int32_t state[5], const unsigned char buffer[64]); +void SHA1Init(SHA1_CTX* context); +void SHA1Update(SHA1_CTX* context, const unsigned char* data, u_int32_t len); +void SHA1Final(unsigned char digest[20], SHA1_CTX* context); + +# define SHA1_Transform SHA1Transform +# define SHA1_Init SHA1Init +# define SHA1_Update SHA1Update +# define SHA1_Final SHA1Final + +# define SHA_DIGEST_LENGTH 20 + +#endif +