Enum diem_crypto::noise::NoiseError[][src]

pub enum NoiseError {
    MsgTooShort,
    Hkdf,
    Encrypt,
    Decrypt,
    WrongPublicKeyReceived,
    SessionClosed,
    PayloadTooLarge,
    ReceivedMsgTooLarge,
    ResponseBufferTooSmall,
    NonceOverflow,
}
Expand description

A NoiseError enum represents the different types of error that noise can return to users of the crate

Variants

MsgTooShort

the received message is too short to contain the expected data

Hkdf

HKDF has failed (in practice there is no reason for HKDF to fail)

Encrypt

encryption has failed (in practice there is no reason for encryption to fail)

Decrypt

could not decrypt the received data (most likely the data was tampered with

WrongPublicKeyReceived

the public key received is of the wrong format

SessionClosed

session was closed due to decrypt error

PayloadTooLarge

the payload that we are trying to send is too large

ReceivedMsgTooLarge

the message we received is too large

ResponseBufferTooSmall

the response buffer passed as argument is too small

NonceOverflow

the nonce exceeds the maximum u64 value (in practice this should not happen)

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

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

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.