Class PartialHashTreeProcessor


  • public class PartialHashTreeProcessor
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      PartialHashTreeProcessor​(org.bouncycastle.asn1.tsp.PartialHashtree tree)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsHash​(byte[] hash)
      Checks whether a PartialHashtree (RFC4998) contains a given hash.
      byte[] getHash​(DigestCalculator digestCalculator)
      Compute a hash over the whole partialHashTree: - Concatenate all the hashes contained in the partial hash tree; - Generate a hash over the concatenated hashes, using a provided DigestCalculator.
      void verifyContainsHash​(byte[] hash)
      Checks whether a PartialHashtree (RFC4998) contains a given hash.
      • Methods inherited from class java.lang.Object

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

      • PartialHashTreeProcessor

        public PartialHashTreeProcessor​(org.bouncycastle.asn1.tsp.PartialHashtree tree)
    • Method Detail

      • getHash

        public byte[] getHash​(DigestCalculator digestCalculator)
        Compute a hash over the whole partialHashTree: - Concatenate all the hashes contained in the partial hash tree; - Generate a hash over the concatenated hashes, using a provided DigestCalculator.
        Parameters:
        digestCalculator - the DigestCalculator to use in order to generate the hash
        Returns:
        a hash value that is representative of the whole partial hash tree.
      • containsHash

        public boolean containsHash​(byte[] hash)
        Checks whether a PartialHashtree (RFC4998) contains a given hash.
        Parameters:
        hash - the hash to check
        Returns:
        true if the hash is present within the PartialHashtree's set of values, false otherwise.