docs/jws/general/sign/interfaces/Signature.md
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.
Configures an individual signature in a General JWS.
āø addSignature(key, options?): Signature
Adds another signature to the enclosing GeneralSign and returns its configuration.
| Parameter | Type | Description |
|---|---|---|
key | KeyInput | Private key or shared secret. See Algorithm Key Requirements. |
options? | SignOptions | JWS Sign options. |
Signature
āø done(): GeneralSign
Returns the enclosing GeneralSign instance.
āø setProtectedHeader(protectedHeader): Signature
Sets the JWS Protected Header. May only be called once.
| Parameter | Type | Description |
|---|---|---|
protectedHeader | JWSHeaderParameters | JWS Protected Header. |
Signature
āø setUnprotectedHeader(unprotectedHeader): Signature
Sets the JWS Unprotected Header. May only be called once.
| Parameter | Type | Description |
|---|---|---|
unprotectedHeader | JWSHeaderParameters | JWS Unprotected Header. |
Signature
āø sign(): Promise<GeneralJWS>
Creates all signatures on the enclosing GeneralSign, using their configured keys.