mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-04-04 10:33:43 +00:00
* move to “crates” style folder * Update workspace * clear crate names * Rename crate folders based on feedback * Use workspace dependencies instead of paths * Move updated files from core
30 lines
642 B
Rust
30 lines
642 B
Rust
use thiserror::Error;
|
|
|
|
/// Errors produced by the Double Ratchet protocol
|
|
#[derive(Debug, Error, Clone, PartialEq, Eq)]
|
|
pub enum RatchetError {
|
|
#[error("ciphertext too short")]
|
|
CiphertextTooShort,
|
|
|
|
#[error("invalid nonce")]
|
|
InvalidNonce,
|
|
|
|
#[error("decryption failed")]
|
|
DecryptionFailed,
|
|
|
|
#[error("message replay detected")]
|
|
MessageReplay,
|
|
|
|
#[error("too many skipped messages")]
|
|
TooManySkippedMessages,
|
|
|
|
#[error("missing remote DH key")]
|
|
MissingRemoteDhKey,
|
|
|
|
#[error("missing receiving chain")]
|
|
MissingReceivingChain,
|
|
|
|
#[error("deserialization failed")]
|
|
DeserializationFailed,
|
|
}
|