[][src]Trait rcmixed::traits::PublicKeyAlgorithm

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>; }

Associated Types

Loading content...

Required methods

fn encrypt(plain: &[u8], public_key: &Self::PublicKey) -> Vec<u8>

fn decrypt(cipher: &[u8], secret_key: &Self::SecretKey) -> Vec<u8>

Loading content...

Implementors

Loading content...