Function nettle::rsa::encrypt_pkcs1

source ·
pub fn encrypt_pkcs1<R: Random>(
    public: &PublicKey,
    random: &mut R,
    plaintext: &[u8],
    ciphertext: &mut [u8]
) -> Result<()>
Expand description

Encrypts plaintext using public, producing ciphertext.

ciphertext must have the same size as the modulo of public.

The plaintext is padded using RSAES-PKCS1-v1_5.