Function nettle::rsa::decrypt_pkcs1 [−][src]
pub fn decrypt_pkcs1<R: Random>(
public: &PublicKey,
private: &PrivateKey,
random: &mut R,
ciphertext: &[u8],
plaintext: &mut [u8]
) -> Result<()>
Expand description
Decrypts ciphertext
using public
/private
. Returns the
resulting plaintext.
The ciphertext expected to be padded using
RSAES-PKCS1-v1_5
.
Errors
Returns InvalidArgument
if plaintext
’s size is greater or
equal than public
’s modulo.