Nut/OS  4.10.3
API Reference
Base64 Codec

Base64 Encoder and Decoder. More...

Collaboration diagram for Base64 Codec:

Functions

char * NutEncodeBase64 (CONST char *str)
 Do base-64 encoding on a string.
char * NutDecodeBase64 (char *str)
 Do base-64 decoding on a string.

Detailed Description

Base64 Encoder and Decoder.


Function Documentation

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).

Parameters:
strPoints to the string to be encoded.
Returns:
Newly allocated string containing the encoded data. Must be freed later

Definition at line 77 of file base64_encode.c.

References NutHeapAlloc, PRG_RDB, and strlen().

Here is the call graph for this function:

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).

Parameters:
strPoints to the base64 encoded string to be decoded
Returns:
Return the actual number of bytes generated.

Definition at line 116 of file base64_decode.c.

References PRG_RDB.

Referenced by NutHttpAuthValidate().