Trait PublicKeyAlgorithm
rcmixed::traits
pub trait PublicKeyAlgorithm { type PublicKey: Serialize + DeserializeOwned; type SecretKey: Serialize + DeserializeOwned; fn encrypt(plain: &[u8], public_key: &Self::PublicKey) -> Vec<u8>; fn decrypt(cipher: &[u8], secret_key: &Self::SecretKey) -> Vec<u8>; }
type PublicKey: Serialize + DeserializeOwned
type SecretKey: Serialize + DeserializeOwned
fn encrypt(plain: &[u8], public_key: &Self::PublicKey) -> Vec<u8>
fn decrypt(cipher: &[u8], secret_key: &Self::SecretKey) -> Vec<u8>