C Porting Layer API Reference for Oracle Internet of Things Cloud Service Client Software Library. Release 21.1.1.0.0-3. E80003-19
|
The file contains porting layer for cryptography. More...
#include "iotcs.h"
Go to the source code of this file.
Defines | |
#define | IOTCS_MD5_DIGEST_LENGTH 32 |
Typedefs | |
typedef const char *(* | iotcs_port_get_next_string_func )(void *) |
Handler for function used in iotcs_port_md5 method. | |
typedef const char *(* | iotcs_port_get_next_chunk_func )(void *, int *) |
Functions | |
iotcs_result | iotcs_port_crypto_encode_base64 (char *output, size_t *output_length, const char *input, size_t input_length) |
Encodes the input buffer and writes the result to output buffer. | |
iotcs_result | iotcs_port_crypto_decode_base64 (char *output, size_t *output_length, const char *input, size_t input_length) |
Decodes the input buffer and writes the result to output buffer. | |
iotcs_result | iotcs_port_crypto_init (void) |
Initializes cryptography related functionality. | |
void | iotcs_port_crypto_finalize (void) |
Finalizes cryptography related functionality. | |
iotcs_result | iotcs_port_md5 (unsigned char *output_buffer, iotcs_port_get_next_string_func func, void *data) |
Computes MD5 message digest Calculate MD5 digest for NULL-terminated strings returned by func(data) where func and data are given as arguments. | |
iotcs_result | iotcs_port_md5_file (unsigned char *output_buffer, iotcs_port_get_next_chunk_func func, void *data) |
Computes MD5 message digest Calculate MD5 digest for NULL-terminated strings returned by func(data) where func and data are given as arguments. |
The file contains porting layer for cryptography.
iotcs_result iotcs_port_crypto_decode_base64 | ( | char * | output, |
size_t * | output_length, | ||
const char * | input, | ||
size_t | input_length | ||
) |
Decodes the input buffer and writes the result to output buffer.
output | an output buffer |
output_length | IN : length of the output buffer OUT : number of bytes written to the output buffer |
input | an input buffer |
input_length | a length of the input buffer |
iotcs_result iotcs_port_crypto_encode_base64 | ( | char * | output, |
size_t * | output_length, | ||
const char * | input, | ||
size_t | input_length | ||
) |
Encodes the input buffer and writes the result to output buffer.
output | an output buffer |
output_length | IN : length of the output buffer OUT : number of bytes written to the output buffer |
input | an input buffer |
input_length | a length of the input buffer |
void iotcs_port_crypto_finalize | ( | void | ) |
Finalizes cryptography related functionality.
iotcs_result iotcs_port_crypto_init | ( | void | ) |
Initializes cryptography related functionality.
iotcs_result iotcs_port_md5 | ( | unsigned char * | output_buffer, |
iotcs_port_get_next_string_func | func, | ||
void * | data | ||
) |
Computes MD5 message digest Calculate MD5 digest for NULL-terminated strings returned by func(data) where func and data are given as arguments.
Calculation stops when func(data) returns NULL. The calculated MD5 digest is saved to output_buffer which is guaranteed to be at least IOTCS_MD5_DIGEST_LENGTH bytes in size.
output_buffer | buffer to write output which size is IOTCS_MD5_DIGEST_LENGTH bytes |
func | a function that provides strings for MD5 from data container |
data | to be passed to 'func' as an argument |
iotcs_result iotcs_port_md5_file | ( | unsigned char * | output_buffer, |
iotcs_port_get_next_chunk_func | func, | ||
void * | data | ||
) |
Computes MD5 message digest Calculate MD5 digest for NULL-terminated strings returned by func(data) where func and data are given as arguments.
Calculation stops when func(data) returns NULL. The calculated MD5 digest is saved to output_buffer which is guaranteed to be at least IOTCS_MD5_DIGEST_LENGTH bytes in size.
output_buffer | buffer to write output which size is IOTCS_MD5_DIGEST_LENGTH bytes |
func | a function that provides strings for MD5 from data container |
data | to be passed to 'func' as an argument |