Skip to main content

encrypt

Function encrypt 

Source
fn encrypt<R, D, MGD>(
    rng: &mut R,
    pub_key: &RsaPublicKey,
    msg: &[u8],
    digest: &mut D,
    mgf_digest: &mut MGD,
    label: Option<Box<[u8]>>,
) -> Result<Vec<u8>>
Expand description

Encrypts the given message with RSA and the padding scheme from PKCS#1 OAEP.

The message must be no longer than the length of the public modulus minus 2 + (2 * hash.size()).