#include <stddef.h>
#include "sopc_enums.h"
Go to the source code of this file.
◆ SOPC_HelperDecode_Base64()
SOPC_ReturnStatus SOPC_HelperDecode_Base64 |
( |
const char * | pInput, |
|
|
unsigned char ** | ppOut, |
|
|
size_t * | pOutLen ) |
This function decodes a null-terminated base64 C string.
- Parameters
-
| pInput | A valid pointer to the null-terminated base64 C string. |
[out] | ppOut | A valid pointer poiting to NULL. It will be set to the buffer containing the newly decoded data. The allocated buffer must be freed by the caller. |
| pOutLen | The size of the ppOut comptuted during the function execution. |
- Returns
- SOPC_STATUS_OK when successful otherwise SOPC_STATUS_NOK.
◆ SOPC_HelperDecode_Hex()
SOPC_ReturnStatus SOPC_HelperDecode_Hex |
( |
const char * | pInput, |
|
|
unsigned char * | pOut, |
|
|
size_t | outputLen ) |
Decodes a hexadecimal ByteString.
- Parameters
-
| pInput | A valid pointer to the hexadecimal ByteString. |
[out] | pOut | A valid pointer to the output (you should allocate strlen( pInput )/2 in pOut . |
| outputLen | The size of the pInput divided by two. |
- Returns
- SOPC_STATUS_OK when successful otherwise SOPC_STATUS_NOK.
◆ SOPC_HelperEncode_Hex()
SOPC_ReturnStatus SOPC_HelperEncode_Hex |
( |
const unsigned char * | pInput, |
|
|
char * | pOut, |
|
|
size_t | inputLen ) |
Encodes a ByteString to a hexadecimal ByteString.
- Parameters
-
| pInput | A valid pointer to a ByteString. |
[out] | pOut | A valid pointer to the output (you should allocate strlen( pInput )*2 in pOut . |
| inputLen | The size of the pInput . |
- Returns
- SOPC_STATUS_OK when successful otherwise SOPC_STATUS_NOK.