RsassaPkcs1ContextBuilder
Provides support for building RSASSA-PKCS1-v1_5 signature contexts. This class derives SignatureContextBuilder providing the same methods but internally using a specific signature scheme.
Extends
Accessors
digestAlgorithm
Set Signature
set digestAlgorithm(
algorithm
):void
Set the digest algorithm to use for hashing message contents. This will default to SHA-256 if not specified.
Throws
InvalidArgumentError If the algorithm is invalid.
Parameters
algorithm
The digest algorithm to use.
Returns
void
Inherited from
SignatureContextBuilder
.digestAlgorithm
signingAlgorithm
Set Signature
set signingAlgorithm(
algorithm
):void
Set the algorithm to use for signing. If not specified, this will be determined from the key type if possible.
Throws
InvalidArgumentError If the algorithm is invalid.
Parameters
algorithm
The asymmetric algorithm to use for signing.
Returns
void
Inherited from
SignatureContextBuilder
.signingAlgorithm
Methods
buildSigningContext()
buildSigningContext(
key
):SigningContext
Build a context for signing operations. This context can be used to create digital signatures using the specified private key.
Parameters
key
The private key to use for signing.
Returns
A signing context object.
Throws
AccessDeniedError If the key lacks the KeyPurpose.SIGN purpose.
Throws
InvalidArgumentError If the signing algorithm is not supported.
Inherited from
SignatureContextBuilder
.buildSigningContext
buildVerificationContext()
buildVerificationContext(
key
):VerificationContext
Build a context for verification operations. This context can be used to verify digital signatures using the specified public key.
Parameters
key
The public key to use for verification.
Returns
A verification context object.
Throws
AccessDeniedError If the key lacks the KeyPurpose.VERIFY purpose.
Throws
InvalidArgumentError If the signing algorithm is not supported.
Inherited from
SignatureContextBuilder
.buildVerificationContext
Last updated: Sep 30, 2025