Skip to main content

steam_crypto/
error.rs

1//! Crypto error types.
2
3use thiserror::Error;
4
5#[derive(Error, Debug)]
6pub enum CryptoError {
7    #[error("Invalid key length")]
8    InvalidKeyLength,
9
10    #[error("Encryption failed: {0}")]
11    EncryptionFailed(String),
12
13    #[error("Decryption failed: {0}")]
14    DecryptionFailed(String),
15
16    #[error("Invalid HMAC")]
17    InvalidHmac,
18
19    #[error("Invalid CRC")]
20    InvalidCrc,
21}