cryptoy 0.4.0

Toy implementations of cryptographic protocols for educational purposes
Documentation
use thiserror::Error;

#[derive(Error, Debug)]
pub enum Error {
    #[error("invalid parameters for generating key")]
    InvalidKeyParams { prime_bits: usize },

    #[error("arithmetic overflow")]
    ArithmeticOverflow,

    #[error("message too large")]
    MessageTooLarge,

    #[error("invalid size for operation")]
    InvalidSize,

    #[error("invalid padding")]
    InvalidPadding,

    #[error("unknown error")]
    UnknownError,
}