cas-lib 0.2.77

A function wrapper layer for RustCrypto and Dalek-Cryptography. Intended to be used in FFI situations with a global heap deallactor at the top level project.
Documentation
1
2
3
4
5
6
7
8
9
10
pub struct RSAKeyPairResult {
    pub private_key: String,
    pub public_key: String,
}

pub trait CASRSAEncryption {
    fn generate_rsa_keys(key_size: usize) -> RSAKeyPairResult;
    fn sign(private_key: String, hash: Vec<u8>) -> Vec<u8>;
    fn verify(public_key: String, hash: Vec<u8>, signed_text: Vec<u8>) -> bool;
}