public final class Sha1HashCode extends Object
byte[].| Modifier and Type | Method and Description |
|---|---|
com.google.common.hash.HashCode |
asHashCode()
This method should be used sparingly as we are trying to favor
Sha1HashCode
over HashCode, where appropriate. Currently, the FileHashCache API is
written in terms of HashCode, so conversions are common. |
boolean |
equals(Object obj) |
static Sha1HashCode |
fromBytes(byte[] bytes)
Clones the specified bytes and uses the clone to create a new
Sha1HashCode. |
static Sha1HashCode |
fromHashCode(com.google.common.hash.HashCode hashCode) |
String |
getHash() |
int |
hashCode() |
static Sha1HashCode |
of(String hash) |
String |
toString()
Same as
getHash(). |
com.google.common.hash.Hasher |
update(com.google.common.hash.Hasher hasher)
Updates the specified
Hasher by putting the 20 bytes of this SHA-1 to it in order. |
public static Sha1HashCode fromBytes(byte[] bytes)
Sha1HashCode.public static Sha1HashCode fromHashCode(com.google.common.hash.HashCode hashCode)
public static Sha1HashCode of(String hash)
public com.google.common.hash.Hasher update(com.google.common.hash.Hasher hasher)
Hasher by putting the 20 bytes of this SHA-1 to it in order.Hasher.public com.google.common.hash.HashCode asHashCode()
Sha1HashCode
over HashCode, where appropriate. Currently, the FileHashCache API is
written in terms of HashCode, so conversions are common. As we migrate it to use Sha1HashCode, this method should become unnecessary.HashCode with an equivalent valuepublic String getHash()