Interface: Signature
August 29, 2025 ยท View on GitHub
๐ 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
| Parameter | Type |
|---|---|
...args | [Uint8Array | CryptoKey | JWK | KeyObject, SignOptions] |
Returns
Signature
done()
โธ done(): GeneralSign
Returns the enclosing GeneralSign instance
Returns
setProtectedHeader()
โธ setProtectedHeader(protectedHeader): Signature
Sets the JWS Protected Header on the Signature object.
Parameters
| Parameter | Type | Description |
|---|---|---|
protectedHeader | JWSHeaderParameters | JWS Protected Header. |
Returns
Signature
setUnprotectedHeader()
โธ setUnprotectedHeader(unprotectedHeader): Signature
Sets the JWS Unprotected Header on the Signature object.
Parameters
| Parameter | Type | Description |
|---|---|---|
unprotectedHeader | JWSHeaderParameters | JWS Unprotected Header. |
Returns
Signature
sign()
โธ sign(...args): Promise<GeneralJWS>
A shorthand for calling encrypt() on the enclosing GeneralSign instance
Parameters
| Parameter | Type |
|---|---|
...args | [] |