Interface ContentVerifier

  • All Implemented Interfaces:

    
    public interface ContentVerifier
    
                        

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

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract AlgorithmIdentifier getAlgorithmIdentifier() Return the algorithm identifier describing the signature algorithm and parameters this verifier supports.
      abstract OutputStream getOutputStream() Returns a stream that will accept data for the purpose of calculating a signature for later verification.
      abstract boolean verify(Array<byte> expected) Return true if the expected value of the signature matches the data passed into the stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getAlgorithmIdentifier

         abstract AlgorithmIdentifier getAlgorithmIdentifier()

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

        Returns:

        algorithm oid and parameters.

      • getOutputStream

         abstract OutputStream getOutputStream()

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

        Returns:

        an OutputStream

      • verify

         abstract boolean verify(Array<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