com.cedarsoft.crypt
Class Hash
java.lang.Object
com.cedarsoft.crypt.Hash
- All Implemented Interfaces:
- Serializable
public class Hash
- extends Object
- implements Serializable
Represents a hash value
- See Also:
- Serialized Form
Hash
public Hash(@NotNull
Algorithm algorithm,
@NotNull
byte[] value)
getAlgorithm
@NotNull
public Algorithm getAlgorithm()
getValueAsHex
@NotNull
public String getValueAsHex()
getValue
@NotNull
public byte[] getValue()
toString
@NonNls
public String toString()
- Overrides:
toString in class Object
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
fromHex
@NotNull
public static Hash fromHex(@NotNull
Algorithm algorithm,
@NotNull
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.