Base64 Encoder and Decoder. More...
Functions | |
char * | NutEncodeBase64 (const char *str) |
Do base-64 encoding on a string. | |
char * | NutDecodeBase64 (char *str) |
Do base-64 decoding on a string. |
Base64 Encoder and Decoder.
char * NutEncodeBase64 | ( | const char * | str | ) |
Do base-64 encoding on a string.
Return newly allocated string filled with the bytes generated. The encoded size will be at least 4/3 the size of the text, and may be smaller larger if there needs to be some padding characters (blanks, newlines).
str | Points to the string to be encoded. |
References NULL, NutHeapAlloc, PRG_RDB, and strlen().
char * NutDecodeBase64 | ( | char * | str | ) |
Do base-64 decoding on a string.
Ignore any non-base64 bytes. Return the actual number of bytes generated. The decoded size will be at most 3/4 the size of the encoded, and may be smaller if there are padding characters (blanks, newlines).
str | Points to the base64 encoded string to be decoded |
References PRG_RDB.
Referenced by NutHttpAuthValidate().