Skip to main content

oaep_encrypt_digest

Function oaep_encrypt_digest 

Source
pub(crate) fn oaep_encrypt_digest<R, D, MGD>(
    rng: &mut R,
    msg: &[u8],
    label: Option<Box<[u8]>>,
    k: usize,
) -> Result<Zeroizing<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()).