Functions
Crypt_SetKey
inline void Crypt_SetKey(
const c8* key
)

Set the encryption key Call to this function is mandatory before calling Crypt_Encode or Crypt_Decode functions.

Parameters
key
const c8*

Zero-terminated string that contain the key

Crypt_SetMap
inline void Crypt_SetMap(
const c8* map
)

Set the encryption character mapping table Not mandatory (default one will be use instead).

Parameters
map
const c8*

Zero-terminated string that contain the character mapping table (should be 16, 32 or 64 charater long depending on number of bit per character used)

Crypt_SetCode
inline void Crypt_SetCode(
const u16* code
)

Set the encryption code bit field Not mandatory (default one will be use instead).

Parameters
code
const u16*

Array of 8 entries of 16-bit number that map each bit into 2 characters

Crypt_Encode
bool Crypt_Encode(
const voiddata,
u8 size,
c8* str
)

Encrypt data

Parameters
data
const void*

Source data buffer

size
u8

Size of the data buffer

str
c8*

Destination string buffer (size must be: input data size x 2 + 1).

Returns

FALSE if encoding failed

Crypt_Decode
bool Crypt_Decode(
const c8* str,
voiddata
)

Decrypt data

Parameters
str
const c8*

Source string

data
void*

Destination data buffer  (size must be: length of the string / 2).

Returns

FALSE if decoding failed