PxCrypt v0.2.2
Encrypt data within an image
Loading...
Searching...
No Matches
PxCrypt::MultiDecoder Class Referencefinal

The MultiDecoder class decodes a payload and identifying tag from multiple encoded images.

#include <>>

Inheritance diagram for PxCrypt::MultiDecoder:
[legend]

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
 
- Public Member Functions inherited from PxCrypt::Decoder
virtual ~Decoder ()
 
QByteArray presharedKey () const
 
void setPresharedKey (const QByteArray &key)
 

Constructor & Destructor Documentation

◆ MultiDecoder()

PxCrypt::MultiDecoder::MultiDecoder ( )

Constructs a decoder with an empty pre-shared key.

Member Function Documentation

◆ decode()

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.

Note
encoded and mediums do not need to be in the same order they were at the time of encoding, but they do need to be in the same order relative to each other so that the correct medium is matched with the correct encoded image.

After an image is successfully decoded the tag of the encoded data is made available via tag().

See also
MultiEncoder::encode().

◆ tag()

QString PxCrypt::MultiDecoder::tag ( ) const

Returns the tag of the last successfully decoded payload.

See also
Encoder::setTag().

The documentation for this class was generated from the following files: