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

The StandardDecoder class decodes a payload and identifying tag from a single encoded image.

#include <>>

Inheritance diagram for PxCrypt::StandardDecoder:
[legend]

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

Constructor & Destructor Documentation

◆ StandardDecoder()

PxCrypt::StandardDecoder::StandardDecoder ( )

Constructs a decoder with an empty pre-shared key.

Member Function Documentation

◆ decode()

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().

See also
StandardEncoder::encode().

◆ tag()

QString PxCrypt::StandardDecoder::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: