Bouncy Castle Cryptography Library 1.60

org.bouncycastle.operator
Interface ContentVerifier


public interface ContentVerifier

General interface for an operator that is able to verify a signature based on data in a stream of output.


Method Summary
 org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier()
          Return the algorithm identifier describing the signature algorithm and parameters this verifier supports.
 java.io.OutputStream getOutputStream()
          Returns a stream that will accept data for the purpose of calculating a signature for later verification.
 boolean verify(byte[] expected)
          Return true if the expected value of the signature matches the data passed into the stream.
 

Method Detail

getAlgorithmIdentifier

public org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier()
Return the algorithm identifier describing the signature algorithm and parameters this verifier supports.

Returns:
algorithm oid and parameters.

getOutputStream

public java.io.OutputStream 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:
an OutputStream

verify

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

Parameters:
expected - expected value of the signature on the data.
Returns:
true if the signature verifies, false otherwise

Bouncy Castle Cryptography Library 1.60