Node crypto.privateDecrypt function | API Reference | Bun
BuildDocsReferenceGuidesBlogDiscord/
node:crypto/
privateDecryptFprivateDecrypt
Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
node:crypto/
privateDecryptFprivateDecrypt
function
crypto.privateDecryptfunction
privateDecrypt(privateKey:
RsaPrivateKey |
KeyLike,buffer: string | ArrayBufferViewArrayBufferLike>): 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 typesinterface
RsaPrivateKeykey:
KeyLikeoaepHash?: string
oaepLabel?: TypedArrayArrayBufferLike>
padding?: number
passphrase?: stringtype
KeyLike = string |
Buffer |
KeyObjectResources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →