class PBase64 |
This class is used to encode/decode data using the MIME standard base64 encoding mechanism as defined in RFC1521.
![]() | PBase64 () Construct a base 64 encoder/decoder and initialise both encode and decode members as in StartEncoding() and StartDecoding() |
![]() | GetEncodedString () Get the partial Base64 string for the data encoded so far. |
![]() | CompleteEncoding () Complete the base 64 encoding and return the remainder of the encoded Base64 string. |
![]() | ProcessDecoding ( const PString & str ) Incorporate the specified data into the base 64 decoding. |
![]() | GetDecodedData ( void* dataBlock, PINDEX length ) Get the data decoded so far from the Base64 strings processed. |
![]() | IsDecodeOK () Return a flag to indicate that the input was decoded without any extraneous or illegal characters in it that were ignored. |
![]() | Decode ( const PString & str ) Convert a printable text string to binary data using the Internet MIME standard base 64 content transfer encoding. |
Run Time Type functions
I/O functions
Miscellaneous functions
Comparison functions
This class is used to encode/decode data using the MIME standard base64 encoding mechanism as defined in RFC1521.To encode a large block of data use the following seqeunce:
PBase64 base; base.StartEncoding(); while (Read(dataChunk)) { base.ProcessEncoding(dataChunk); out << base.GetEncodedString(); } out << base.CompleteEncoding();if smaller blocks that fit easily in memory are to be encoded the Encode() functions can be used to everything in one go.
To decode a large block of data use the following sequence:
PBase64 base; base.StartDecoding(); while (Read(str) && ProcessDecoding(str)) Write(base.GetDecodedData()); Write(base.GetDecodedData());if smaller blocks that fit easily in memory are to be decoded the Decode() functions can be used to everything in one go.
The base64 string is checked and TRUE returned if all perfectly correct. If FALSE is returned then the string had extraneous or illegal characters in it that were ignored. This does not mean that the data is not valid, only that it is suspect.
Alphabetic index HTML hierarchy of classes or Java