温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/crypto/Sign/sign
点击访问原文链接

Sign.sign method | Node.js crypto module | Bun

Sign.sign method | Node.js crypto module | BunBuildDocsReferenceGuidesBlogDiscord/node:crypto/Sign/signMsign

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:crypto/Sign/signMsign

method

crypto.Sign.signsign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput): NonSharedBuffer;

Calculates the signature on all the data passed through using either sign.update() or sign.write().

If privateKey is not a KeyObject, this function behaves as if privateKey had been passed to createPrivateKey. If it is an object, the following additional properties can be passed:

If outputEncoding is provided a string is returned; otherwise a Buffer is returned.

The Sign object can not be again used after sign.sign() method has been called. Multiple calls to sign.sign() will result in an error being thrown.

sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,outputFormat: BinaryToTextEncoding): string;

Calculates the signature on all the data passed through using either sign.update() or sign.write().

If privateKey is not a KeyObject, this function behaves as if privateKey had been passed to createPrivateKey. If it is an object, the following additional properties can be passed:

If outputEncoding is provided a string is returned; otherwise a Buffer is returned.

The Sign object can not be again used after sign.sign() method has been called. Multiple calls to sign.sign() will result in an error being thrown.

Referenced typestype KeyLike = string | Buffer | KeyObjectinterface SignKeyObjectInputcontext?: ArrayBuffer | ArrayBufferViewArrayBufferLike>dsaEncoding?: DSAEncodingkey: KeyObjectpadding?: number
saltLength?: numberinterface SignPrivateKeyInputcontext?: ArrayBuffer | ArrayBufferViewArrayBufferLike>dsaEncoding?: DSAEncodingencoding?: stringformat?: KeyFormatkey: string | BufferArrayBufferLike>padding?: number
passphrase?: string | BufferArrayBufferLike>saltLength?: numbertype?: PrivateKeyExportTypeinterface SignJsonWebKeyInputcontext?: ArrayBuffer | ArrayBufferViewArrayBufferLike>dsaEncoding?: DSAEncodingformat: 'jwk'key: JsonWebKeypadding?: number
saltLength?: numbertype BinaryToTextEncoding = 'base64' | 'base64url' | 'hex' | 'binary'

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

Sign.sign method | Node.js crypto module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    API documentation for method node:crypto.Sign.sign | Bun