PxCrypt v0.2.2
Encrypt data within an image
|
The MultiDecoder class decodes a payload and identifying tag from multiple encoded images.
#include <>>
Classes | |
class | Error |
The MultiDecoder::Error class is used to report errors during multi-image decoding. More... | |
Public Member Functions | |
MultiDecoder () | |
Error | decode (QByteArray &decoded, const QList< QImage > &encoded, const QList< QImage > &mediums={}) |
QString | tag () const |
![]() | |
virtual | ~Decoder () |
QByteArray | presharedKey () const |
void | setPresharedKey (const QByteArray &key) |
PxCrypt::MultiDecoder::MultiDecoder | ( | ) |
Constructs a decoder with an empty pre-shared key.
MultiDecoder::Error PxCrypt::MultiDecoder::decode | ( | QByteArray & | decoded, |
const QList< QImage > & | encoded, | ||
const QList< QImage > & | mediums = {} ) |
Retrieves data from the encoded set of PxCrypt images encoded and stores the result in decoded, then returns an error status.
The original medium images mediums are used as a reference for images with encodings that require it, but are otherwise ignored. The encoded data is descrambled using the currently set pre-shared key.
After an image is successfully decoded the tag of the encoded data is made available via tag().
QString PxCrypt::MultiDecoder::tag | ( | ) | const |
Returns the tag of the last successfully decoded payload.