Top Inners Fields Constructors Methods
org.bouncycastle.operator.jcajce

public Class JcaContentVerifierProviderBuilder

extends Object
Class Inheritance
Imports
java.io.OutputStream, java.security.GeneralSecurityException, .Provider, .PublicKey, .Signature, .SignatureException, java.security.cert.CertificateEncodingException, .CertificateException, .X509Certificate, org.bouncycastle.asn1.x509.AlgorithmIdentifier, .SubjectPublicKeyInfo, org.bouncycastle.cert.X509CertificateHolder, org.bouncycastle.cert.jcajce.JcaX509CertificateHolder, org.bouncycastle.jcajce.util.DefaultJcaJceHelper, .NamedJcaJceHelper, .ProviderJcaJceHelper, org.bouncycastle.operator.ContentVerifier, .ContentVerifierProvider, .OperatorCreationException, .RawContentVerifier, .RuntimeOperatorException

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Field Summary

Modifier and TypeField and Description
private OperatorHelper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ContentVerifierProvider
public ContentVerifierProvider
build(final X509Certificate certificate)

public ContentVerifierProvider
build(final PublicKey publicKey)

public ContentVerifierProvider
private Signature
private Signature
public JcaContentVerifierProviderBuilder
public JcaContentVerifierProviderBuilder
setProvider(String providerName)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

helperback to summary
private OperatorHelper helper

Constructor Detail

JcaContentVerifierProviderBuilderback to summary
public JcaContentVerifierProviderBuilder()

Method Detail

buildback to summary
public ContentVerifierProvider build(X509CertificateHolder certHolder) throws OperatorCreationException, CertificateException
buildback to summary
public ContentVerifierProvider build(final X509Certificate certificate) throws OperatorCreationException
buildback to summary
public ContentVerifierProvider build(final PublicKey publicKey) throws OperatorCreationException
buildback to summary
public ContentVerifierProvider build(SubjectPublicKeyInfo publicKey) throws OperatorCreationException
createRawSigback to summary
private Signature createRawSig(AlgorithmIdentifier algorithm, PublicKey publicKey)
createSignatureback to summary
private Signature createSignature(AlgorithmIdentifier algorithm, PublicKey publicKey) throws OperatorCreationException
setProviderback to summary
public JcaContentVerifierProviderBuilder setProvider(Provider provider)
setProviderback to summary
public JcaContentVerifierProviderBuilder setProvider(String providerName)
org.bouncycastle.operator.jcajce back to summary

private Class JcaContentVerifierProviderBuilder.RawSigVerifier

extends SigVerifier
implements RawContentVerifier
Class Inheritance
All Implemented Interfaces
org.bouncycastle.operator.RawContentVerifier

Field Summary

Modifier and TypeField and Description
private Signature
Inherited from org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder.SigVerifier:
stream

Constructor Summary

AccessConstructor and Description
pack-priv
RawSigVerifier(AlgorithmIdentifier algorithm, Signature standardSig, Signature rawSignature)

Method Summary

Modifier and TypeMethod and Description
public boolean
verify(byte[]
expected value of the signature on the data.
expected
)

Overrides org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder.SigVerifier.verify.

Implements org.bouncycastle.operator.ContentVerifier.verify.

Return true if the expected value of the signature matches the data passed into the stream.
public boolean
verify(byte[]
digest calculated from the content.
digest
,
byte[]
expected value of the signature
expected
)

Implements org.bouncycastle.operator.RawContentVerifier.verify.

Verify that the expected signature value was derived from the passed in digest.
Inherited from org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder.SigVerifier:
getAlgorithmIdentifiergetOutputStream

Field Detail

rawSignatureback to summary
private Signature rawSignature

Constructor Detail

RawSigVerifierback to summary
pack-priv RawSigVerifier(AlgorithmIdentifier algorithm, Signature standardSig, Signature rawSignature)

Method Detail

verifyback to summary
public boolean verify(byte[] expected)

Overrides org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder.SigVerifier.verify.

Implements org.bouncycastle.operator.ContentVerifier.verify.

Doc from org.bouncycastle.operator.ContentVerifier.verify.

Return true if the expected value of the signature matches the data passed into the stream.

Parameters
expected:byte[]

expected value of the signature on the data.

Returns:boolean

true if the signature verifies, false otherwise

verifyback to summary
public boolean verify(byte[] digest, byte[] expected)

Implements org.bouncycastle.operator.RawContentVerifier.verify.

Doc from org.bouncycastle.operator.RawContentVerifier.verify.

Verify that the expected signature value was derived from the passed in digest.

Parameters
digest:byte[]

digest calculated from the content.

expected:byte[]

expected value of the signature

Returns:boolean

true if the expected signature is derived from the digest, false otherwise.

org.bouncycastle.operator.jcajce back to summary

private Class JcaContentVerifierProviderBuilder.SigVerifier

extends Object
implements ContentVerifier
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder.SigVerifier
All Implemented Interfaces
org.bouncycastle.operator.ContentVerifier
Known Direct Subclasses
org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder.RawSigVerifier

Field Summary

Modifier and TypeField and Description
private final AlgorithmIdentifier
private final Signature
protected final OutputStream

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public AlgorithmIdentifier
getAlgorithmIdentifier()

Implements org.bouncycastle.operator.ContentVerifier.getAlgorithmIdentifier.

Return the algorithm identifier describing the signature algorithm and parameters this verifier supports.
public OutputStream
getOutputStream()

Implements org.bouncycastle.operator.ContentVerifier.getOutputStream.

Returns a stream that will accept data for the purpose of calculating a signature for later verification.
public boolean
verify(byte[]
expected value of the signature on the data.
expected
)

Implements org.bouncycastle.operator.ContentVerifier.verify.

Return true if the expected value of the signature matches the data passed into the stream.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

algorithmback to summary
private final AlgorithmIdentifier algorithm
signatureback to summary
private final Signature signature
streamback to summary
protected final OutputStream stream

Constructor Detail

SigVerifierback to summary
pack-priv SigVerifier(AlgorithmIdentifier algorithm, Signature signature)

Method Detail

getAlgorithmIdentifierback to summary
public AlgorithmIdentifier getAlgorithmIdentifier()

Implements org.bouncycastle.operator.ContentVerifier.getAlgorithmIdentifier.

Doc from org.bouncycastle.operator.ContentVerifier.getAlgorithmIdentifier.

Return the algorithm identifier describing the signature algorithm and parameters this verifier supports.

Returns:AlgorithmIdentifier

algorithm oid and parameters.

getOutputStreamback to summary
public OutputStream getOutputStream()

Implements org.bouncycastle.operator.ContentVerifier.getOutputStream.

Doc from org.bouncycastle.operator.ContentVerifier.getOutputStream.

Returns a stream that will accept data for the purpose of calculating a signature for later verification. Use org.bouncycastle.util.io.TeeOutputStream if you want to accumulate the data on the fly as well.

Returns:OutputStream

an OutputStream

verifyback to summary
public boolean verify(byte[] expected)

Implements org.bouncycastle.operator.ContentVerifier.verify.

Doc from org.bouncycastle.operator.ContentVerifier.verify.

Return true if the expected value of the signature matches the data passed into the stream.

Parameters
expected:byte[]

expected value of the signature on the data.

Returns:boolean

true if the signature verifies, false otherwise