QCA::Hex
#include <QtCrypto>
Public Member Functions | |
Hex (Direction dir=Encode) | |
void | clear () override |
MemoryRegion | final () override |
bool | ok () const override |
MemoryRegion | update (const MemoryRegion &a) override |
Public Member Functions inherited from QCA::TextFilter | |
TextFilter (Direction dir) | |
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) |
Public Member Functions inherited from QCA::Filter | |
MemoryRegion | process (const MemoryRegion &a) |
Additional Inherited Members | |
Protected Attributes inherited from QCA::TextFilter | |
Direction | _dir |
Detailed Description
Hexadecimal encoding / decoding.
- Examples
- hextest.cpp, and randomtest.cpp.
Definition at line 164 of file qca_textfilter.h.
Constructor & Destructor Documentation
◆ Hex()
Standard constructor.
- Parameters
-
dir the Direction that should be used.
- Note
- The direction can be changed using the setup() call.
Member Function Documentation
◆ clear()
|
overridevirtual |
◆ final()
|
overridevirtual |
Complete the algorithm.
- Returns
- any remaining output. Because of the way hexadecimal encoding works, this will return a zero length array - any output will have been returned from the update() call.
Implements QCA::Filter.
◆ ok()
|
overridevirtual |
Test if an update() or final() call succeeded.
- Returns
- true if the previous call succeeded
Implements QCA::Filter.
◆ update()
|
overridevirtual |
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.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.