From df2441c834cf341d9b969dacc2dd8dac07cd588e Mon Sep 17 00:00:00 2001 From: xeb Date: Wed, 17 Jun 2009 00:56:34 +0400 Subject: initial import --- pppd_plugin/src/pppd/sha1.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 pppd_plugin/src/pppd/sha1.h (limited to 'pppd_plugin/src/pppd/sha1.h') diff --git a/pppd_plugin/src/pppd/sha1.h b/pppd_plugin/src/pppd/sha1.h new file mode 100644 index 00000000..83f64df2 --- /dev/null +++ b/pppd_plugin/src/pppd/sha1.h @@ -0,0 +1,31 @@ +/* sha1.h */ + +/* If OpenSSL is in use, then use that version of SHA-1 */ +#ifdef OPENSSL +#include +#define __SHA1_INCLUDE_ +#endif + +#ifndef __SHA1_INCLUDE_ + +#ifndef SHA1_SIGNATURE_SIZE +#ifdef SHA_DIGESTSIZE +#define SHA1_SIGNATURE_SIZE SHA_DIGESTSIZE +#else +#define SHA1_SIGNATURE_SIZE 20 +#endif +#endif + +typedef struct { + u_int32_t state[5]; + u_int32_t count[2]; + unsigned char buffer[64]; +} SHA1_CTX; + +extern void SHA1_Init(SHA1_CTX *); +extern void SHA1_Update(SHA1_CTX *, const unsigned char *, unsigned int); +extern void SHA1_Final(unsigned char[SHA1_SIGNATURE_SIZE], SHA1_CTX *); + +#define __SHA1_INCLUDE_ +#endif /* __SHA1_INCLUDE_ */ + -- cgit v1.2.3