Class DescriptorDigest

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int HASH_LENGTH  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Two digest objects are equal if their digest strings are equal.
      static DescriptorDigest fromDigest​(java.lang.String digest)
      Creates a new instance from a valid digest string.
      static DescriptorDigest fromHash​(java.lang.String hash)
      Creates a new instance from a valid hash string.
      java.lang.String getHash()  
      int hashCode()
      Pass-through hash code of the digest string.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • fromHash

        public static DescriptorDigest fromHash​(java.lang.String hash)
                                         throws java.security.DigestException
        Creates a new instance from a valid hash string.
        Parameters:
        hash - the hash to generate the DescriptorDigest from
        Returns:
        a new DescriptorDigest created from the hash
        Throws:
        java.security.DigestException - if the hash is invalid
      • fromDigest

        public static DescriptorDigest fromDigest​(java.lang.String digest)
                                           throws java.security.DigestException
        Creates a new instance from a valid digest string.
        Parameters:
        digest - the digest to generate the DescriptorDigest from
        Returns:
        a new DescriptorDigest created from the digest
        Throws:
        java.security.DigestException - if the digest is invalid
      • getHash

        public java.lang.String getHash()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Pass-through hash code of the digest string.
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Two digest objects are equal if their digest strings are equal.
        Overrides:
        equals in class java.lang.Object