PxCrypt v0.2.2
Encrypt data within an image
|
The StandardDecoder class decodes a payload and identifying tag from a single encoded image.
#include <>>
Classes | |
class | Error |
The StandardDecoder::Error class is used to report errors during image decoding. More... | |
Public Member Functions | |
StandardDecoder () | |
Error | decode (QByteArray &decoded, const QImage &encoded, const QImage &medium=QImage()) |
QString | tag () const |
![]() | |
virtual | ~Decoder () |
QByteArray | presharedKey () const |
void | setPresharedKey (const QByteArray &key) |
PxCrypt::StandardDecoder::StandardDecoder | ( | ) |
Constructs a decoder with an empty pre-shared key.
StandardDecoder::Error PxCrypt::StandardDecoder::decode | ( | QByteArray & | decoded, |
const QImage & | encoded, | ||
const QImage & | medium = QImage() ) |
Retrieves data from the encoded PxCrypt image encoded and stores the result in decoded, then returns an error status.
The original medium image medium is used as a reference for images with encodings that require it, but is 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::StandardDecoder::tag | ( | ) | const |
Returns the tag of the last successfully decoded payload.