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
pub trait CASHybrid {
    fn generate_key_pair() -> (Vec<u8>, Vec<u8>, Vec<u8>);
    fn generate_info_str() -> Vec<u8>;
    fn encrypt(plaintext: Vec<u8>, public_key: Vec<u8>, info_str: Vec<u8>) -> (Vec<u8>, Vec<u8>, Vec<u8>);
    fn decrypt(ciphertext: Vec<u8>, private_key: Vec<u8>, encapped_key: Vec<u8>, tag: Vec<u8>, info_str: Vec<u8>) -> Vec<u8>;
}