ironcrypt 0.1.1

Library-first crypto toolkit: Argon2 password hashing, AES-256-GCM / XChaCha20 streaming, RSA/ECC hybrid encryption, and optional CLI/daemon.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use p256::{PublicKey as EccPublicKey, SecretKey as EccSecretKey};
use rsa::{RsaPrivateKey, RsaPublicKey};

/// An enum to hold different types of public keys.
pub enum PublicKey {
    Rsa(RsaPublicKey),
    Ecc(EccPublicKey),
}

/// An enum to hold different types of private keys.
///
/// RSA private keys are large; boxing them would churn the call sites for little gain.
#[allow(clippy::large_enum_variant)]
pub enum PrivateKey {
    Rsa(RsaPrivateKey),
    Ecc(EccSecretKey),
}