qca
QCA::Base64 Class Reference
[QCA user API]
#include <QtCrypto>

Detailed Description
Base64 encoding / decodingDefinition at line 232 of file qca_textfilter.h.
Public Member Functions | |
| Base64 (Direction dir=Encode) | |
| virtual void | clear () |
| virtual MemoryRegion | final () |
| int | lineBreaksColumn () const |
| bool | lineBreaksEnabled () const |
| virtual bool | ok () const |
| void | setLineBreaksColumn (int column) |
| void | setLineBreaksEnabled (bool b) |
| virtual MemoryRegion | update (const MemoryRegion &a) |
Constructor & Destructor Documentation
| QCA::Base64::Base64 | ( | Direction | dir = Encode |
) |
Standard constructor.
- Parameters:
-
dir the Direction that should be used.
- Note:
- The direction can be changed using the setup() call.
Definition at line 209 of file qca_textfilter.cpp.
Member Function Documentation
| void QCA::Base64::clear | ( | ) | [virtual] |
Reset the internal state.
This is useful to reuse an existing Base64 object
Implements QCA::Filter.
Definition at line 216 of file qca_textfilter.cpp.
| MemoryRegion QCA::Base64::final | ( | ) | [virtual] |
Complete the algorithm.
- Returns:
- any remaining output. Because of the way Base64 encoding works, you will get either an empty array, or an array containing one or two "=" (equals, 0x3D) characters.
Implements QCA::Filter.
Definition at line 493 of file qca_textfilter.cpp.
| int QCA::Base64::lineBreaksColumn | ( | ) | const |
| bool QCA::Base64::lineBreaksEnabled | ( | ) | const |
| bool QCA::Base64::ok | ( | ) | const [virtual] |
Test if an update() or final() call succeeded.
- Returns:
- true if the previous call succeeded
Implements QCA::Filter.
Definition at line 512 of file qca_textfilter.cpp.
| void QCA::Base64::setLineBreaksColumn | ( | int | column | ) |
Sets the column that linebreaks should be inserted at when encoding.
- Parameters:
-
column the column number that line breaks should be inserted at.
Definition at line 238 of file qca_textfilter.cpp.
| void QCA::Base64::setLineBreaksEnabled | ( | bool | b | ) |
Sets line break mode.
If enabled, linebreaks will be added to encoded output or accepted in encoded input. If disabled, linebreaks in encoded input will cause a failure to decode. The default is disabled.
- Parameters:
-
b whether to enable line breaks (true) or disable line breaks (false)
Definition at line 233 of file qca_textfilter.cpp.
| MemoryRegion QCA::Base64::update | ( | const MemoryRegion & | a | ) | [virtual] |
Process more data, returning the corresponding encoded or decoded (depending on the Direction set in the constructor or setup() call) representation.
If you find yourself with code that only calls this method once, you might be better off using encode() or decode(). Similarly, if the data is really a string, you might be better off using arrayToString(), encodeString(), stringToArray() or decodeString().
- Parameters:
-
a the array containing data to process
Implements QCA::Filter.
Definition at line 442 of file qca_textfilter.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference