Back to Jose

Interface: Signature

docs/jws/general/sign/interfaces/Signature.md

6.2.22.5 KB
Original Source

Interface: Signature

šŸ’— Help the project

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.

Used to build General JWS object's individual signatures.

Methods

addSignature()

ā–ø addSignature(...args): Signature

A shorthand for calling addSignature() on the enclosing GeneralSign instance

Parameters

ParameterType
...args[Uint8Array | CryptoKey | JWK | KeyObject, SignOptions]

Returns

Signature


done()

ā–ø done(): GeneralSign

Returns the enclosing GeneralSign instance

Returns

GeneralSign


setProtectedHeader()

ā–ø setProtectedHeader(protectedHeader): Signature

Sets the JWS Protected Header on the Signature object.

Parameters

ParameterTypeDescription
protectedHeaderJWSHeaderParametersJWS Protected Header.

Returns

Signature


setUnprotectedHeader()

ā–ø setUnprotectedHeader(unprotectedHeader): Signature

Sets the JWS Unprotected Header on the Signature object.

Parameters

ParameterTypeDescription
unprotectedHeaderJWSHeaderParametersJWS Unprotected Header.

Returns

Signature


sign()

ā–ø sign(...args): Promise<GeneralJWS>

A shorthand for calling encrypt() on the enclosing GeneralSign instance

Parameters

ParameterType
...args[]

Returns

Promise<GeneralJWS>