EncodeBase32Hex (open)
Encodes a string into an RFC 4648 base-32 hex encoded string
Syntax
// Core function, no LOADLIB necessary
STRING FUNCTION EncodeBase32Hex(STRING value, BOOLEAN dontpad)
Parameters
STRING value
String to encode
BOOLEAN dontpad
If set to TRUE, the resulting string is not padded
Return value
STRING
The encoded string
Description
This function encodes a string to base-32 hex encoding. This way non-printable ASCII characters can be safely encoded. The alphabet used is the one from RFC 4648 (table 4, chapter 7). The resulting string is padded using '=' characters until the length is a multiple of 8 characters.
Examples
// returns "91IMOR3F5GG5ERRIDHI0===="
STRING example1 := EncodeBase32Hex("Hello, World");
// returns "64P36==="
STRING example2 := EncodeBase32Hex("123");