mirror of
https://github.com/hanzoai/jose.git
synced 2026-09-24 17:00:01 +00:00
2.5 KiB
2.5 KiB
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.
Table of contents
Methods
Methods
addSignature
â–¸ addSignature(...args): Signature
A shorthand for calling addSignature() on the enclosing GeneralSign instance
Parameters
| Name | Type |
|---|---|
...args |
[key: Uint8Array | KeyLike, options?: SignOptions] |
Returns
done
â–¸ done(): GeneralSign
Returns the enclosing GeneralSign
Returns
setProtectedHeader
â–¸ setProtectedHeader(protectedHeader): Signature
Sets the JWS Protected Header on the Signature object.
Parameters
| Name | Type | Description |
|---|---|---|
protectedHeader |
JWSHeaderParameters |
JWS Protected Header. |
Returns
setUnprotectedHeader
â–¸ setUnprotectedHeader(unprotectedHeader): Signature
Sets the JWS Unprotected Header on the Signature object.
Parameters
| Name | Type | Description |
|---|---|---|
unprotectedHeader |
JWSHeaderParameters |
JWS Unprotected Header. |
Returns
sign
â–¸ sign(...args): Promise<GeneralJWS>
A shorthand for calling encrypt() on the enclosing GeneralSign instance
Parameters
| Name | Type |
|---|---|
...args |
[] |