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

optimized pair of base16 encode/decode implementations More...

#include "_base64.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "AampUtils.h"
Include dependency graph for base16.cpp:

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 pair of base16 encode/decode implementations

Definition in file base16.cpp.

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.