Package org.bouncycastle.operator.bc
Class BcContentVerifierProviderBuilder
java.lang.Object
org.bouncycastle.operator.bc.BcContentVerifierProviderBuilder
- Direct Known Subclasses:
BcDSAContentVerifierProviderBuilder,BcECContentVerifierProviderBuilder,BcEdDSAContentVerifierProviderBuilder,BcRSAContentVerifierProviderBuilder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(X509CertificateHolder certHolder) build(AsymmetricKeyParameter publicKey) protected abstract SignercreateSigner(AlgorithmIdentifier sigAlgId) Create the correct signer for the algorithm identifier sigAlgId.protected abstract AsymmetricKeyParameterextractKeyParameters(SubjectPublicKeyInfo publicKeyInfo) Extract an AsymmetricKeyParameter from the passed in SubjectPublicKeyInfo structure.
-
Field Details
-
digestProvider
-
-
Constructor Details
-
BcContentVerifierProviderBuilder
public BcContentVerifierProviderBuilder()
-
-
Method Details
-
build
public ContentVerifierProvider build(X509CertificateHolder certHolder) throws OperatorCreationException - Throws:
OperatorCreationException
-
build
public ContentVerifierProvider build(AsymmetricKeyParameter publicKey) throws OperatorCreationException - Throws:
OperatorCreationException
-
extractKeyParameters
protected abstract AsymmetricKeyParameter extractKeyParameters(SubjectPublicKeyInfo publicKeyInfo) throws IOException Extract an AsymmetricKeyParameter from the passed in SubjectPublicKeyInfo structure.- Parameters:
publicKeyInfo- a publicKeyInfo structure describing the public key required.- Returns:
- an AsymmetricKeyParameter object containing the appropriate public key.
- Throws:
IOException- if the publicKeyInfo data cannot be parsed,
-
createSigner
protected abstract Signer createSigner(AlgorithmIdentifier sigAlgId) throws OperatorCreationException Create the correct signer for the algorithm identifier sigAlgId.- Parameters:
sigAlgId- the algorithm details for the signature we want to verify.- Returns:
- a Signer object.
- Throws:
OperatorCreationException- if the Signer cannot be constructed.
-