17 #ifndef __IOTC_BSP_CRYPTO_H__ 18 #define __IOTC_BSP_CRYPTO_H__ 21 #include <sys/types.h> 24 #include "iotc_types.h" 85 unsigned char* dst_string,
size_t dst_string_size,
size_t* bytes_written,
86 const uint8_t* src_buf,
size_t src_buf_size);
99 const uint8_t* src_buf,
100 uint32_t src_buf_size);
119 uint8_t* dst_buf,
size_t dst_buf_size,
120 size_t* bytes_written,
121 const uint8_t* src_buf,
122 size_t src_buf_size);
Can't base64-encode string.
iotc_bsp_crypto_state_t iotc_bsp_base64_encode_urlsafe(unsigned char *dst_string, size_t dst_string_size, size_t *bytes_written, const uint8_t *src_buf, size_t src_buf_size)
Encodes a string as a URL-safe, base64 string by replacing all URL-unsafe characters with a - (dash) ...
Can't parse private key data.
enum iotc_bsp_crypto_state_e iotc_bsp_crypto_state_t
The crytography function states.
iotc_bsp_crypto_state_t iotc_bsp_sha256(uint8_t *dst_buf_32_bytes, const uint8_t *src_buf, uint32_t src_buf_size)
Generates a SHA256 cryptographic hash.
Can't write data to the buffer because the data is larger than the buffer.
iotc_bsp_crypto_state_t iotc_bsp_ecc(const iotc_crypto_key_data_t *private_key, uint8_t *dst_buf, size_t dst_buf_size, size_t *bytes_written, const uint8_t *src_buf, size_t src_buf_size)
Generates an Elliptic Curve signature for a private key.
The cryptography function succeeded.
Can't create SHA256 digest.
Can't create ECC signature.