Interface OutputVerifier<T extends Parameters>

Type Parameters:
T - the parameters type for the verifier.
All Known Subinterfaces:
OutputVerifierWithMessageRecovery<T>
All Known Implementing Classes:
FipsOutputVerifier

public interface OutputVerifier<T extends Parameters>
Base interface for an output verifier which can be used to verify a signature against a data stream.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the parameters for this output verifier.
    Returns a stream that will accept data for the purpose of verifying a previously calculated signature.
    boolean
    isVerified(byte[] signature)
    Return true if the data written to the verifying stream matches the data the signature was calculated against.
  • Method Details

    • getParameters

      T getParameters()
      Return the parameters for this output verifier.
      Returns:
      the verifier's parameters.
    • getVerifyingStream

      UpdateOutputStream getVerifyingStream()
      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.
      Returns:
      an UpdateOutputStream
    • isVerified

      boolean isVerified(byte[] signature) throws InvalidSignatureException
      Return true if the data written to the verifying stream matches the data the signature was calculated against.
      Parameters:
      signature - the signature to be confirmed.
      Returns:
      true if the data verifies against the signature, false otherwise.
      Throws:
      InvalidSignatureException