Enum safe_crypto::EncryptionError[]

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

This error is returned if encryption or decryption fail. 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.

Trait Implementations

impl Debug for EncryptionError
[src]

Formats the value using the given formatter. Read more

impl Display for EncryptionError

Formats the value using the given formatter. Read more

impl Error for EncryptionError

This method is soft-deprecated. Read more

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

impl From<SerialisationError> for EncryptionError

Performs the conversion.

impl From<()> for EncryptionError

Performs the conversion.

impl From<i32> for EncryptionError

Performs the conversion.

Auto Trait Implementations