This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088
Fork of libMiMic by
Diff: core/utils/sha1/sha1.h
- Revision:
- 57:bc4330dfa62f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/utils/sha1/sha1.h Fri Sep 13 06:38:16 2013 +0000 @@ -0,0 +1,40 @@ +/* sha1.h */ +#include "NyLPC_stdlib.h" +/* If OpenSSL is in use, then use that version of SHA-1 */ +#ifdef OPENSSL +#include <t_sha.h> +#define __SHA1_INCLUDE_ +#endif + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#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 { + NyLPC_TUInt32 state[5]; + NyLPC_TUInt32 count[2]; + unsigned char buffer[64]; +}SHA1_CTX; + +void SHA1Init(SHA1_CTX* context); +void SHA1Update(SHA1_CTX* context,const void* data, unsigned int len); +void SHA1Final(unsigned char digest[20], SHA1_CTX* context); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#define __SHA1_INCLUDE_ +#endif /* __SHA1_INCLUDE_ */ +