privateDecrypt
external fun privateDecrypt(privateKey: RsaPrivateKey, buffer: <Error class: unknown class><out <Error class: unknown class>>): Buffer<*>(source)
external fun privateDecrypt(privateKey: KeyLike, buffer: <Error class: unknown class><out <Error class: unknown class>>): Buffer<*>(source)
Decrypts buffer
with privateKey
. buffer
was previously encrypted using the corresponding public key, for example using {@link publicEncrypt}.
If privateKey
is not a KeyObject
, this function behaves as if privateKey
had been passed to {@link createPrivateKey}. If it is an object, the padding
property can be passed. Otherwise, this function uses RSA_PKCS1_OAEP_PADDING
.
Since
v0.11.14