[][src]Enum devolutions_crypto::DevoCryptoError

pub enum DevoCryptoError {
    InvalidLength,
    InvalidKeyLength,
    InvalidOutputLength,
    InvalidSignature,
    InvalidMac,
    InvalidDataType,
    UnknownType,
    UnknownSubtype,
    UnknownVersion,
    NullPointer,
    CryptoError,
    RandomError,
    IoError(Error),
}

The enum containing the various error types.

Variants

InvalidLength

The provided data has an invalid length. Error code: -1

InvalidKeyLength

The key length is invalid. Error code: -2

InvalidOutputLength

The length of the FFI output buffer is invalid. Error code: -3

InvalidSignature

The signature of the data blob does not match 0x0d0c. Error code: -11

InvalidMac

The MAC is invalid. Error code: -12

InvalidDataType

The operation cannot be done with this type. Error code: -13

UnknownType

The data type is unknown. Error code: -21

UnknownSubtype

The data subtype is unknown. Error code: -22

UnknownVersion

The data type version is unknown. Error code: -23

NullPointer

A null pointer has been passed to the FFI interface. Error code: -31

CryptoError

A cryptographic error occurred. Error code: -32

RandomError

An error with the Random Number Generator occurred. Error code: -33

IoError(Error)

A generic IO error has occurred. Error code: -34

Methods

impl DevoCryptoError[src]

pub fn error_code(&self) -> i64[src]

Returns the error code associated with the error. This is useful for passing the exception type across a language boundary.

Trait Implementations

impl From<InvalidKeyLength> for DevoCryptoError[src]

impl From<MacError> for DevoCryptoError[src]

impl From<InvalidKeyIvLength> for DevoCryptoError[src]

impl From<BlockModeError> for DevoCryptoError[src]

impl From<Error> for DevoCryptoError[src]

impl From<Error> for DevoCryptoError[src]

impl From<Error> for DevoCryptoError[src]

impl Debug for DevoCryptoError[src]

impl Display for DevoCryptoError[src]

impl Error for DevoCryptoError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,