1#ifndef STANDARD_DECODER_H
2#define STANDARD_DECODER_H
5#include "pxcrypt/pxcrypt_codec_export.h"
11#include <qx/core/qx-abstracterror.h>
14#include "pxcrypt/codec/decoder.h"
19class StandardDecoderPrivate;
35 Error decode(
QByteArray& decoded,
const QImage& encoded,
const QImage& medium = QImage());
55 static inline const QString PREFIX_STRING = u
"Decoding failed."_s;
58 {InvalidSource, u
"The encoded image is invalid."_s},
59 {MissingMedium, u
"The encoded image requires a medium to be decoded but none was provided."_s},
60 {DimensionMismatch, u
"The required medium image has different dimensions than the encoded image."_s},
61 {NotLargeEnough, u
"The provided image is not large enough to be an encoded image."_s},
62 {InvalidMeta, u
"The provided image is not encoded."_s},
63 {SkimFailed, u
"There was an error while skimming data."_s}
83 quint32 deriveValue()
const override;
84 QString derivePrimary()
const override;
85 QString deriveSecondary()
const override;
The Encoder class is a base class from which all PxCrypt decoders derive in order to skim and decrypt...
Definition decoder.h:17
The MultiDecoder::Error class is used to report errors during multi-image decoding.
Definition multi_decoder.h:39
The StandardDecoder::Error class is used to report errors during image decoding.
Definition standard_decoder.h:39
Type
Definition standard_decoder.h:43
@ NoError
Definition standard_decoder.h:44
@ DimensionMismatch
Definition standard_decoder.h:47
@ InvalidMeta
Definition standard_decoder.h:49
@ InvalidSource
Definition standard_decoder.h:45
@ MissingMedium
Definition standard_decoder.h:46
@ NotLargeEnough
Definition standard_decoder.h:48
The StandardDecoder class decodes a payload and identifying tag from a single encoded image.
Definition standard_decoder.h:22
The PxCrypt namespace is the main namespace through which all functionality of the PxCrypt library is...
Definition decoder.cpp:6