#include <QtCrypto>
Public Member Functions | |
QString | arrayToString (const MemoryRegion &a) |
MemoryRegion | decode (const MemoryRegion &a) |
QString | decodeString (const QString &s) |
Direction | direction () const |
MemoryRegion | encode (const MemoryRegion &a) |
QString | encodeString (const QString &s) |
void | setup (Direction dir) |
MemoryRegion | stringToArray (const QString &s) |
TextFilter (Direction dir) | |
Protected Attributes | |
Direction | _dir |
This differs from Filter in that it has the concept of an algorithm that works in two directions, and supports operations on QString arguments.
QCA::TextFilter::TextFilter | ( | Direction | dir | ) |
QString QCA::TextFilter::arrayToString | ( | const MemoryRegion & | a | ) |
Process an array in the "forward" direction, returning a QString.
This is equivalent to encode(), except that it returns a QString, rather than a byte array.
a | the array to encode |
MemoryRegion QCA::TextFilter::decode | ( | const MemoryRegion & | a | ) |
Process a string in the "reverse" direction, returning a string.
This is equivalent to decode(), except that it takes and returns a QString, rather than byte arrays.
s | the string to decode |
Direction QCA::TextFilter::direction | ( | ) | const |
The direction the TextFilter is set up to use.
MemoryRegion QCA::TextFilter::encode | ( | const MemoryRegion & | a | ) |
Process an array in the "forward" direction, returning an array.
This method runs in the forward direction, so for something like a Base64 encoding, it takes the "native" array, and returns that array encoded in base64.
a | the array to encode |
void QCA::TextFilter::setup | ( | Direction | dir | ) |
MemoryRegion QCA::TextFilter::stringToArray | ( | const QString & | s | ) |
Direction QCA::TextFilter::_dir [protected] |
Internal state variable for the Direction that the filter operates in.