Interface DigestCalculator

  • All Implemented Interfaces:

    
    public interface DigestCalculator
    
                        

    General interface for an operator that is able to calculate a digest from 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 representing the digest implemented by this calculator.
      abstract OutputStream getOutputStream() Returns a stream that will accept data for the purpose of calculating a digest.
      abstract Array<byte> getDigest() Return the digest calculated on what has been written to the calculator's output stream.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • getOutputStream

         abstract OutputStream getOutputStream()

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

        Returns:

        an OutputStream

      • getDigest

         abstract Array<byte> getDigest()

        Return the digest calculated on what has been written to the calculator's output stream.

        Returns:

        a digest.