This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088

Dependents:   MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers sha1.h Source File

sha1.h

00001 /* sha1.h */
00002 #include "NyLPC_stdlib.h"
00003 /* If OpenSSL is in use, then use that version of SHA-1 */
00004 #ifdef OPENSSL
00005 #include <t_sha.h>
00006 #define __SHA1_INCLUDE_
00007 #endif
00008 
00009 #ifdef __cplusplus
00010 extern "C" {
00011 #endif /* __cplusplus */
00012 
00013 #ifndef __SHA1_INCLUDE_
00014 
00015 #ifndef SHA1_SIGNATURE_SIZE
00016 #ifdef SHA_DIGESTSIZE
00017 #define SHA1_SIGNATURE_SIZE SHA_DIGESTSIZE
00018 #else
00019 #define SHA1_SIGNATURE_SIZE 20
00020 #endif
00021 #endif
00022 
00023 
00024 typedef struct {
00025     NyLPC_TUInt32 state[5];
00026     NyLPC_TUInt32 count[2];
00027     unsigned char buffer[64];
00028 }SHA1_CTX;
00029 
00030 void SHA1Init(SHA1_CTX* context);
00031 void SHA1Update(SHA1_CTX* context,const void* data, unsigned int len);
00032 void SHA1Final(unsigned char digest[20], SHA1_CTX* context);
00033 
00034 #ifdef __cplusplus
00035 }
00036 #endif /* __cplusplus */
00037 
00038 #define __SHA1_INCLUDE_
00039 #endif /* __SHA1_INCLUDE_ */
00040