org.bouncycastle.crypto.OutputVerifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bc-fips Show documentation
Show all versions of bc-fips Show documentation
The FIPS 140-3 Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms certified to FIPS 140-3 level 1. This jar contains JCE provider and low-level API for the BC-FJA version 2.0.0, FIPS Certificate #4743. Please see certificate for certified platform details.
package org.bouncycastle.crypto;
/**
* Base interface for an output verifier which can be used to verify a signature against a data stream.
*
* @param the parameters type for the verifier.
*/
public interface OutputVerifier
{
/**
* Return the parameters for this output verifier.
*
* @return the verifier's parameters.
*/
T getParameters();
/**
* Returns a stream that will accept data for the purpose of verifying a previously calculated signature.
* Use org.bouncycastle.util.io.TeeOutputStream if you want to accumulate the data on the fly as well.
*
* @return an UpdateOutputStream
*/
UpdateOutputStream getVerifyingStream();
/**
* Return true if the data written to the verifying stream matches the data the signature was calculated against.
*
* @param signature the signature to be confirmed.
* @return true if the data verifies against the signature, false otherwise.
*/
boolean isVerified(byte[] signature)
throws InvalidSignatureException;
}