diff options
author | Stef Walter <stef@memberwebs.com> | 2004-04-24 22:38:50 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-04-24 22:38:50 +0000 |
commit | cbbe71752d7f9c6204ab0f16600fe7f10490f203 (patch) | |
tree | 365e6e472d239d117b5f849c45f3c08fc6617c0a /common/sha1.h | |
parent | ff76efc3e5e1b0e4ca3b10b7402406f619509bba (diff) |
Completed implementation of ldap/ntlm/simple handlers
Diffstat (limited to 'common/sha1.h')
-rw-r--r-- | common/sha1.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/common/sha1.h b/common/sha1.h new file mode 100644 index 0000000..37f734f --- /dev/null +++ b/common/sha1.h @@ -0,0 +1,30 @@ +#ifndef __SHA1_H__ +#define __SHA1_H__ + +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#define SHA1_LEN 20 + +typedef struct sha1_ctx +{ + unsigned long state[5]; + unsigned long count[2]; + unsigned char buffer[64]; +} +sha1_ctx_t; + +void sha1_init(sha1_ctx_t* context); +void sha1_update(sha1_ctx_t* context, const void* data, unsigned int len); +void sha1_final(unsigned char digest[SHA1_LEN], sha1_ctx_t* context); + +#ifdef __cplusplus +} +#endif + +#endif // __SHA1_H__ |