Enum present::DecryptError [] [src]

pub enum DecryptError {
    Utf8Error,
    CiphertextNotAligned(usize),
    CiphertextTooShort(usize),
    InvalidPadding,
    InitVecMissing,
}

Error type describing string decryption errors.

Variants

Indicates that the decrypted bytes cannot be converted to a valid UTF-8-encoded string.

Indicates that the ciphertext length is not a multiple of the block size. Includes the length of the given ciphertext.

Indicates that the ciphertext is too short (i.e. less than one block). Includes the length of the given ciphertext.

Indicates that the padding bytes at the end of the string are invalid or corrupted.

When using an operation mode that requires an initialization vector (pretty much all except ECB), this indicates that the IV was not given in the function arguments.

Trait Implementations

impl Debug for DecryptError
[src]

Formats the value using the given formatter.

impl From<FromUtf8Error> for DecryptError
[src]

Convert string encoding error to the corresponding DecryptError.