Trait wedpr_l_utils::traits::Ecies[][src]

pub trait Ecies {
    fn encrypt<T: ?Sized + AsRef<[u8]>>(
        &self,
        public_key: &T,
        message: &T
    ) -> Result<Vec<u8>, WedprError>;
fn decrypt<T: ?Sized + AsRef<[u8]>>(
        &self,
        private_key: &T,
        ciphertext: &T
    ) -> Result<Vec<u8>, WedprError>; }

Trait of a replaceable elliptic curve integrated encryption scheme (ECIES) algorithm.

Required methods

fn encrypt<T: ?Sized + AsRef<[u8]>>(
    &self,
    public_key: &T,
    message: &T
) -> Result<Vec<u8>, WedprError>
[src]

Encrypts a message by ECIES with a public key.

fn decrypt<T: ?Sized + AsRef<[u8]>>(
    &self,
    private_key: &T,
    ciphertext: &T
) -> Result<Vec<u8>, WedprError>
[src]

Decrypts a ciphertext by ECIES with a private key.

Loading content...

Implementors

Loading content...