com.cedarsoft.utils.crypt
Class Hash
java.lang.Object
com.cedarsoft.utils.crypt.Hash
- All Implemented Interfaces:
- java.io.Serializable
public class Hash
- extends java.lang.Object
- implements java.io.Serializable
Represents a hash value
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Hash
public Hash(@NotNull
Algorithm algorithm,
@NotNull
byte[] value)
getAlgorithm
@NotNull
public Algorithm getAlgorithm()
getValueAsHex
@NotNull
public java.lang.String getValueAsHex()
getValue
@NotNull
public byte[] getValue()
toString
@NonNls
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
fromHex
@NotNull
public static Hash fromHex(@NotNull
Algorithm algorithm,
@NotNull
java.lang.String valueAsHex)
- Creates a hash from the given hex value
- Parameters:
algorithm - the algorithmvalueAsHex - the hex value
- Returns:
- the hash
Copyright © 2009 cedarsoft GmbH. All Rights Reserved.