5#include "pxcrypt/pxcrypt_codec_export.h"
11#include <qx/core/qx-abstracterror.h>
14#include "pxcrypt/codec/decoder.h"
19class MultiDecoderPrivate;
59 static inline const QString PREFIX_STRING = u
"Decoding failed."_s;
62 {MissingSources, u
"No encoded images were provided."_s},
63 {InvalidSource, u
"The encoded image is invalid."_s},
64 {MissingMediums, u
"The encoded images require mediums to be decoded but none or not enough were provided, or some were invalid..."_s},
65 {DimensionMismatch, u
"One of the required medium image has different dimensions than the encoded image."_s},
66 {NotLargeEnough, u
"The provided image is not large enough to be an encoded image."_s},
67 {InvalidMeta, u
"The provided image is not encoded."_s},
68 {PartMismatch, u
"One of the parts had a different complete checksum or tag than the rest, or an unexpected part index."_s},
69 {PartsMissing, u
"The image set consists of more parts than were provided."_s},
70 {ChecksumMismatch, u
"The full payload checksum did not match that of the reassembled payload."_s},
71 {SkimFailed, u
"There was an error while skimming data."_s}
78 qsizetype mImageIndex;
82 Error(Type t = NoError, qsizetype idx = -1,
const QString& s = {});
88 qsizetype imageIndex()
const;
93 quint32 deriveValue()
const override;
94 QString derivePrimary()
const override;
95 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
Type
Definition multi_decoder.h:43
@ DimensionMismatch
Definition multi_decoder.h:48
@ PartMismatch
Definition multi_decoder.h:51
@ MissingSources
Definition multi_decoder.h:45
@ InvalidMeta
Definition multi_decoder.h:50
@ PartsMissing
Definition multi_decoder.h:52
@ InvalidSource
Definition multi_decoder.h:46
@ MissingMediums
Definition multi_decoder.h:47
@ ChecksumMismatch
Definition multi_decoder.h:53
@ NotLargeEnough
Definition multi_decoder.h:49
@ NoError
Definition multi_decoder.h:44
The MultiDecoder class decodes a payload and identifying tag from multiple encoded images.
Definition multi_decoder.h:22
The PxCrypt namespace is the main namespace through which all functionality of the PxCrypt library is...
Definition decoder.cpp:6