m2m_crypto.h
Go to the documentation of this file.
1 
35 #ifndef __M2M_CRYPTO_H__
36 #define __M2M_CRYPTO_H__
37 
38 
39 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
40 INCLUDES
41 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
42 
43 
46 
47 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
48 MACROS
49 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
50 #define M2M_SHA256_CONTEXT_BUFF_LEN 128
51 #define M2M_SHA256_DIGEST_LEN 32
52 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
53 DATA TYPES
54 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
55 
63 typedef struct sha256ctxt{
66 
67 
75 typedef enum{
79 
80 
81 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
82 FUNCTION PROTOTYPES
83 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
84 
85 
86 #ifdef __cplusplus
87  extern "C" {
88 #endif
89 
100 
101 
117 sint8 m2m_sha256_hash_update(tstrM2mSha256Ctxt *psha256Ctxt, uint8 *pu8Data, uint16 u16DataLength);
118 
119 
132 sint8 m2m_sha256_hash_finish(tstrM2mSha256Ctxt *psha256Ctxt, uint8 *pu8Sha256Digest);
133 
134 
135 
136 
169 sint8 m2m_rsa_sign_verify(uint8 *pu8N, uint16 u16NSize, uint8 *pu8E, uint16 u16ESize, uint8 *pu8SignedMsgHash,
170  uint16 u16HashLength, uint8 *pu8RsaSignature);
171 
172 
205 sint8 m2m_rsa_sign_gen(uint8 *pu8N, uint16 u16NSize, uint8 *pu8d, uint16 u16dSize, uint8 *pu8SignedMsgHash,
206  uint16 u16HashLength, uint8 *pu8RsaSignature);
207 #ifdef __cplusplus
208 }
209 #endif
210 
211 
212 #endif /* __M2M_CRYPTO_H__ */
This module contains common APIs declarations.
signed char sint8
Range of values between -128 to 127.
Definition: nm_bsp.h:111
struct sha256ctxt tstrM2mSha256Ctxt
WINC3400 IoT Application Interface Internal Types.
SHA256 context data.
unsigned short uint16
Range of values between 0 to 65535.
Definition: nm_bsp.h:96
sint8 m2m_sha256_hash_init(tstrM2mSha256Ctxt *psha256Ctxt)
SHA256 hash initialization.
tenuRsaSignStatus
RSA Signature status: pass or fail.
Definition: m2m_crypto.h:75
uint32 au32Sha256CtxtBuff[M2M_SHA256_CONTEXT_BUFF_LEN/sizeof(uint32)]
Definition: m2m_crypto.h:64
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.
Definition: nm_bsp.h:103
#define M2M_SHA256_CONTEXT_BUFF_LEN
Definition: m2m_crypto.h:50
unsigned char uint8
Range of values between 0 to 255.
Definition: nm_bsp.h:89
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.


inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:04