Enum safe_crypto::Error[]

pub enum Error {
    Serialisation(SerialisationError),
    DecryptVerify(()),
    InitError(i32),
    DeriveKey,
}

This error is returned if encryption or decryption fails. The encryption failure is rare and mostly connected to serialisation failures. Decryption can fail because of invalid keys, invalid data, or deserialisation failures.

Variants

Occurs when serialisation or deserialisation fails.

Occurs when we can't decrypt a message or verify the signature.

Occurs in case of an error during initialisation.

Occurs when we fail to derive encryption key from password.

Trait Implementations

impl Debug for Error
[src]

Formats the value using the given formatter. Read more

impl Display for Error

Formats the value using the given formatter. Read more

impl Error for Error

This method is soft-deprecated. Read more

The lower-level cause of this error, if any. Read more

impl From<SerialisationError> for Error

Performs the conversion.

impl From<()> for Error

Performs the conversion.

impl From<i32> for Error

Performs the conversion.

Auto Trait Implementations

impl Send for Error

impl Sync for Error