public final class SignerBuilder extends Object
Constructor and Description |
---|
SignerBuilder() |
Modifier and Type | Method and Description |
---|---|
Signer |
build()
Builds and returns the
Signer instance. |
SignerBuilder |
setDefaultSigningHashAlgorithm(HashAlgorithm defaultHashAlgorithm)
Sets the default signing hash algorithm to be used to create new KSI signatures.
|
SignerBuilder |
setDefaultVerificationPolicy(ContextAwarePolicy policy)
Sets the default verification policy.
|
SignerBuilder |
setSigningService(KSISigningService signingService)
Sets the signing service to be used in signing process.
|
public SignerBuilder setDefaultSigningHashAlgorithm(HashAlgorithm defaultHashAlgorithm)
Signer.sign(DataHash)
or Signer.asyncSign(DataHash)
method, this algorithm is
ignored. By default HashAlgorithm.SHA2_256
algorithm is used.public SignerBuilder setSigningService(KSISigningService signingService)
public SignerBuilder setDefaultVerificationPolicy(ContextAwarePolicy policy)
InvalidSignatureContentException
exception is thrown. If needed,
user can access the invalid signature and verification result using the methods
InvalidSignatureContentException.getSignature()
and
InvalidSignatureContentException.getVerificationResult()
.
By default the policy returned by method ContextAwarePolicyAdapter.createInternalPolicy()
is used.
public Signer build()
Signer
instance. If signing client isn't configured, NullPointerException
is thrown.Copyright © 2024 Guardtime. All rights reserved.