function
crypto.privateDecrypt
privateKey: KeyLike | PublicEncryptKeyObjectInput | PublicEncryptPrivateKeyInput | PublicEncryptJsonWebKeyInput,
): NonSharedBuffer;
Decrypts buffer with privateKey. buffer was previously encrypted using the corresponding public key, for example using publicEncrypt.
If privateKey is not a KeyObject, this function behaves as if privateKey had been passed to createPrivateKey. If it is an object, the padding property can be passed. Otherwise, this function uses RSA_PKCS1_OAEP_PADDING.
Referenced types
type KeyLike = BinaryLike | KeyObject
interface PublicEncryptKeyObjectInput
interface PublicEncryptPrivateKeyInput
interface PublicEncryptJsonWebKeyInput
type BinaryLike = string | ArrayBufferLike | NodeJS.ArrayBufferView