public class DescriptorDigest
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
HASH_LENGTH |
Modifier and Type | Method and 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() |
public static final int HASH_LENGTH
public static DescriptorDigest fromHash(java.lang.String hash) throws java.security.DigestException
hash
- the hash to generate the DescriptorDigest
fromDescriptorDigest
created from the hashjava.security.DigestException
- if the hash is invalidpublic static DescriptorDigest fromDigest(java.lang.String digest) throws java.security.DigestException
digest
- the digest to generate the DescriptorDigest
fromDescriptorDigest
created from the digestjava.security.DigestException
- if the digest is invalidpublic java.lang.String getHash()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object