rusty_crypt 0.2.0

Rust library allowing for a very quick and simple implementation of AES-GCM encryption
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
pub enum CryptoError {
    #[error("Invalid base64")]
    InvalidBase64(#[from] base64::DecodeError),

    #[error("Invalid key size")]
    InvalidKeySize,

    #[error("Invalid nonce size")]
    InvalidNonceSize,

    #[error("Encryption failed")]
    EncryptionFailed,

    #[error("Invalid cipher text")]
    InvalidCiphertext,

    #[error("Random generation failed")]
    RandomGenerationFailed,

    #[error("Decryption failed")]
    DecryptionFailed,

    #[error("Invalid UTF-8")]
    InvalidUtf8(#[from] std::string::FromUtf8Error),
}