refactor(web): make smaller components

This commit is contained in:
2025-11-26 05:07:02 +02:00
parent 486f8957eb
commit bb7ef246f8
2 changed files with 170 additions and 126 deletions

View File

@@ -4,15 +4,15 @@ use thiserror::Error;
#[derive(Debug, Error, Clone, PartialEq, Eq)]
pub enum CipherError {
/// Invalid key size for the cipher
#[error("Invalid key size: expected {expected} bytes, got {actual}")]
#[error("Invalid key size: expected {expected} bytes, got {actual}.")]
InvalidKeySize { expected: usize, actual: usize },
/// Input data doesn't match the cipher's block size
#[error("Invalid block size: expected {expected} bytes, got {actual}")]
#[error("Invalid block size: expected {expected} bytes, got {actual}.")]
InvalidBlockSize { expected: usize, actual: usize },
/// Error parsing block from string
#[error("Error parsing block from string: {0}")]
#[error("{0}")]
BlockParseError(#[from] BlockError),
}