35 #ifndef __M2M_CRYPTO_H__    36 #define __M2M_CRYPTO_H__    50 #define M2M_SHA256_CONTEXT_BUFF_LEN             128    51 #define M2M_SHA256_DIGEST_LEN                   32 This module contains common APIs declarations. 
 
signed char sint8
Range of values between -128 to 127. 
 
struct sha256ctxt tstrM2mSha256Ctxt
 
WINC3400 IoT Application Interface Internal Types. 
 
unsigned short uint16
Range of values between 0 to 65535. 
 
sint8 m2m_sha256_hash_init(tstrM2mSha256Ctxt *psha256Ctxt)
SHA256 hash initialization. 
 
tenuRsaSignStatus
RSA Signature status: pass or fail. 
 
uint32 au32Sha256CtxtBuff[M2M_SHA256_CONTEXT_BUFF_LEN/sizeof(uint32)]
 
sint8 m2m_sha256_hash_update(tstrM2mSha256Ctxt *psha256Ctxt, uint8 *pu8Data, uint16 u16DataLength)
SHA256 hash update. 
 
sint8 m2m_rsa_sign_verify(uint8 *pu8N, uint16 u16NSize, uint8 *pu8E, uint16 u16ESize, uint8 *pu8SignedMsgHash, uint16 u16HashLength, uint8 *pu8RsaSignature)
RSA Signature Verification. 
 
unsigned long uint32
Range of values between 0 to 4294967295. 
 
#define M2M_SHA256_CONTEXT_BUFF_LEN
 
unsigned char uint8
Range of values between 0 to 255. 
 
sint8 m2m_sha256_hash_finish(tstrM2mSha256Ctxt *psha256Ctxt, uint8 *pu8Sha256Digest)
SHA256 hash finalization. 
 
sint8 m2m_rsa_sign_gen(uint8 *pu8N, uint16 u16NSize, uint8 *pu8d, uint16 u16dSize, uint8 *pu8SignedMsgHash, uint16 u16HashLength, uint8 *pu8RsaSignature)
RSA Signature Generation.