Enum diem_crypto::noise::NoiseError
source · 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§
source§impl Debug for NoiseError
impl Debug for NoiseError
source§impl Display for NoiseError
impl Display for NoiseError
source§impl Error for NoiseError
impl Error for NoiseError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()