RDK Documentation (Open Sourced RDK Components)
base16.h File Reference

optimized way way base16 Encode/Decode operation More...

#include <stddef.h>
Include dependency graph for base16.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char * base16_Encode (const unsigned char *src, size_t len)
 convert binary data to hascii-encoded equivalent More...
 
unsigned char * base16_Decode (const char *srcPtr, size_t srcLen, size_t *len)
 decode base16 encoded data to binary equivalent More...
 

yes

optimized way way base16 Encode/Decode operation

Definition in file base16.h.

Function Documentation

◆ base16_Encode()

char* base16_Encode ( const unsigned char *  src,
size_t  len 
)

convert binary data to hascii-encoded equivalent

Return values
pointerto malloc'd cstring containing base16-encoded copy
NULLif unsufficient memory to allocate base16-encoded copt
Note
caller responsible for freeing returned cstring
returned string will always contain an even number of characters

Definition at line 39 of file base16.cpp.

◆ base16_Decode()

unsigned char* base16_Decode ( const char *  srcPtr,
size_t  srcLen,
size_t *  len 
)

decode base16 encoded data to binary equivalent

Return values
pointerto malloc'd memory containing decoded binary data.
NULLif insufficient memory to allocate base16-decoded data
Note
caller responsible for freeing returned data

Definition at line 64 of file base16.cpp.