Murl::Util::Base64Encoder Class Reference
The Base64 encoder class. More...
#include "murl_util_encoding_base64.h"
Inheritance diagram for Murl::Util::Base64Encoder:
Public Member Functions | |
Base64Encoder () | |
The default constructor. More... | |
Base64Encoder (UInt32 charsPerLine) | |
Constructor enabling line formatting. More... | |
UInt64 | GetEncodedLength (UInt64 byteSizeIn) const |
Compute the Base64 encoded length. More... | |
UInt64 | Encode (const void *dataIn, UInt64 byteSizeIn, void *dataOut, UInt64 byteSizeOut, Bool encodeEnd=true) |
Encode a memory block to Base64 characters. More... | |
UInt64 | EncodeEnd (void *dataOut, UInt64 byteSizeOut) const |
Encode the Base64 end padding characters. More... | |
Char | EncodeValue (Char value) const |
Encode a 6-bit value to the Base64 character. More... | |
Protected Attributes | |
UInt32 | mLineCount |
The current line character position. | |
UInt32 | mCharsPerLine |
The maximum characters per line. | |
Protected Attributes inherited from Murl::Util::Base64State | |
Step | mStep |
The current state. | |
Char | mChar |
The current character. | |
Additional Inherited Members | |
Protected Types inherited from Murl::Util::Base64State | |
enum | Step { STEP_A , STEP_B , STEP_C , STEP_D } |
State enumeration. More... | |
Protected Member Functions inherited from Murl::Util::Base64State | |
Base64State () | |
The default constructor. | |
Detailed Description
The Base64 encoder class.
Constructor & Destructor Documentation
◆ Base64Encoder() [1/2]
Murl::Util::Base64Encoder::Base64Encoder | ( | ) |
The default constructor.
Line formatting is disabled.
◆ Base64Encoder() [2/2]
Murl::Util::Base64Encoder::Base64Encoder | ( | UInt32 | charsPerLine | ) |
Constructor enabling line formatting.
- Parameters
-
charsPerLine The maximum characters per line.
Member Function Documentation
◆ GetEncodedLength()
Compute the Base64 encoded length.
- Parameters
-
byteSizeIn The number of source bytes.
- Returns
- The number of bytes required for Base64 encoding.
◆ Encode()
UInt64 Murl::Util::Base64Encoder::Encode | ( | const void * | dataIn, |
UInt64 | byteSizeIn, | ||
void * | dataOut, | ||
UInt64 | byteSizeOut, | ||
Bool | encodeEnd = true |
||
) |
Encode a memory block to Base64 characters.
Encoding can be called sequential for divided source blocks.
- Parameters
-
dataIn Pointer to the source memory block. byteSizeIn The byte size of the source memory block. dataOut Pointer to the destination memory block. byteSizeOut The byte size of the destination memory block. encodeEnd If true the padding characters are encoded automatically at the end of the block. Set to false if sequential encoding is required and call EncodeEnd method finally.
- Returns
- The number of bytes written into destination.
◆ EncodeEnd()
Encode the Base64 end padding characters.
This method is required if the encodeEnd parameter from the Encode method is set to false.
- Parameters
-
dataOut Pointer to the destination memory block. byteSizeOut The byte size of the destination memory block.
- Returns
- The number of bytes written into destination.
◆ EncodeValue()
Encode a 6-bit value to the Base64 character.
- Parameters
-
value The 6-bit value to encode.
- Returns
- The corresponding Base64 character or '=' if the value is out of range.
The documentation for this class was generated from the following file:
- murl_util_encoding_base64.h