C Porting Layer API Reference for Oracle Internet of Things Cloud Service Client Software Library. Release 21.1.1.0.0-3. E80003-19
|
00001 /* 00002 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. 00003 * 00004 * This software is dual-licensed to you under the MIT License (MIT) and 00005 * the Universal Permissive License (UPL). See the LICENSE file in the root 00006 * directory for license terms. You may choose either license, or both. 00007 */ 00008 00014 #ifndef IOTCS_PORT_CRYPTO_H 00015 #define IOTCS_PORT_CRYPTO_H 00016 00017 00018 #ifdef __cplusplus 00019 extern "C" { 00020 #endif 00021 00022 #include "iotcs.h" 00023 00024 #define IOTCS_MD5_DIGEST_LENGTH 32 00025 00037 iotcs_result iotcs_port_crypto_encode_base64(char* output, size_t* output_length, const char* input, size_t input_length); 00038 00050 iotcs_result iotcs_port_crypto_decode_base64(char* output, size_t* output_length, const char* input, size_t input_length); 00051 00058 iotcs_result iotcs_port_crypto_init(void); 00059 00064 void iotcs_port_crypto_finalize(void); 00065 00070 typedef const char* (*iotcs_port_get_next_string_func)(void*); 00071 00076 typedef const char* (*iotcs_port_get_next_chunk_func)(void*,int*); 00077 00092 iotcs_result iotcs_port_md5(unsigned char *output_buffer, iotcs_port_get_next_string_func func, void *data); 00093 00108 iotcs_result iotcs_port_md5_file(unsigned char *output_buffer, iotcs_port_get_next_chunk_func func, void *data); 00109 00110 #ifdef __cplusplus 00111 } 00112 #endif 00113 00114 #endif /* IOTCS_PORT_CRYPTO_H */ 00115