BlockCipher

Trait BlockCipher 

Source
pub trait BlockCipher: Sized {
    // Required methods
    fn encrypt_message(
        signer_sk: &[u8; 32],
        receiver_pk: &[u8; 32],
        msg: &[u8],
    ) -> Result<Vec<u8>>;
    fn decrypt_message(
        receiver_sk: &[u8; 32],
        signer_pk: &[u8; 32],
        enc_msg: &[u8],
    ) -> Result<Vec<u8>>;
}
Expand description

This trait defines an association of symbol or nis1 encrypt and decrypt message.

Required Methods§

Source

fn encrypt_message( signer_sk: &[u8; 32], receiver_pk: &[u8; 32], msg: &[u8], ) -> Result<Vec<u8>>

Source

fn decrypt_message( receiver_sk: &[u8; 32], signer_pk: &[u8; 32], enc_msg: &[u8], ) -> Result<Vec<u8>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§