All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bouncycastle.crypto.OutputVerifier Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 2.0.0
Show newest version
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;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy