PxCrypt v0.1
Encrypt data within an image
Loading...
Searching...
No Matches
PxCrypt::DecodeError Class Referencefinal

The DecodeError class is used to report errors during image decoding. More...

#include <>>

Collaboration diagram for PxCrypt::DecodeError:
[legend]

Public Types

enum  Type {
  NoError = 0 ,
  InvalidSource = 1 ,
  MissingMedium = 2 ,
  DimensionMismatch = 3 ,
  NotLargeEnough = 4 ,
  InvalidMeta = 5 ,
  InvalidHeader = 6 ,
  LengthMismatch = 7 ,
  UnexpectedEnd = 8 ,
  ChecksumMismatch = 9
}
 

Public Member Functions

 DecodeError ()
 
QString errorString () const
 
bool isValid () const
 
Type type () const
 

Friends

class Decoder
 

Detailed Description

See also
Decoder and EncodeError.

Member Enumeration Documentation

◆ Type

This enum specifies the type of encoding error that occurred.

Enumerator
NoError 

No error occurred.

InvalidSource 

The encoded image was invalid.

MissingMedium 

The encoded image required a medium to be decoded but none was provided.

DimensionMismatch 

The required medium image had different dimensions than the encoded image.

NotLargeEnough 

The provided image was not large enough to be an encoded image.

InvalidMeta 

The provided image was not encoded.

InvalidHeader 

The provided image was not encoded or the password/medium were incorrect.

LengthMismatch 

The encoded image's header indicated it contained more data than possible.

UnexpectedEnd 

All pixels were skimmed before the expected payload size was reached.

ChecksumMismatch 

The payload's checksum did not match the expected value.

Constructor & Destructor Documentation

◆ DecodeError()

PxCrypt::DecodeError::DecodeError ( )

Constructs an invalid DecodeError error.

See also
isValid().

Member Function Documentation

◆ errorString()

QString PxCrypt::DecodeError::errorString ( ) const

Returns the string representation of the error.

See also
type().

◆ isValid()

bool PxCrypt::DecodeError::isValid ( ) const

Returns true if the error's type is one other than NoError; otherwise, returns false.

See also
Type.

◆ type()

DecodeError::Type PxCrypt::DecodeError::type ( ) const

Returns the type of decoding error.

See also
errorString().

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