Function cfxkey::crypto::ecies::encrypt

source ·
pub fn encrypt(
    public: &Public,
    auth_data: &[u8],
    plain: &[u8]
) -> Result<Vec<u8>, Error>
Expand description

Encrypt a message with a public key, writing an HMAC covering both the plaintext and authenticated data.

Authenticated data may be empty.