Function to convert a string (or a Byte stream) to Base32 based on RFC 4648
Optional “nopad” parameter do not put the padding “=” character (is optional on RFC 4648).
Optional “hex” parameter use RFC 4648 base32 Extended Hex Alphabet encoding instead ot the standard encoding.
http://forum.mikrotik.com/t/base64-and-sha256-function-for-scripting/164889/7