public class Hash
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Hash.Algorithm |
static interface |
Hash.IAlgorithm |
static interface |
Hash.IHashBuilder |
| Constructor and Description |
|---|
Hash(byte[] bytes,
Hash.IAlgorithm algorithm) |
Hash(java.lang.String hex,
Hash.IAlgorithm algorithm) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
Hash.IAlgorithm |
getAlgorithm() |
byte[] |
getBytes() |
static Hash |
hash(Hash.Algorithm algorithm,
byte[] content) |
static Hash |
hash(Hash.Algorithm algorithm,
java.lang.String content) |
int |
hashCode() |
static Hash |
md5(byte[] content) |
static Hash |
md5(java.lang.String content) |
static Hash |
sha256(byte[] content) |
static Hash |
sha256(java.lang.String content) |
static Hash |
sha512(byte[] content) |
static Hash |
sha512(java.lang.String content) |
java.lang.String |
toHex() |
java.lang.String |
toString() |
boolean |
validate(byte[] content) |
boolean |
validate(java.lang.String content) |
boolean |
validate(java.lang.String content,
java.nio.charset.Charset charset) |
public Hash(java.lang.String hex,
Hash.IAlgorithm algorithm)
public Hash(byte[] bytes,
Hash.IAlgorithm algorithm)
public static Hash md5(java.lang.String content)
public static Hash md5(byte[] content)
public static Hash sha256(java.lang.String content)
public static Hash sha256(byte[] content)
public static Hash sha512(java.lang.String content)
public static Hash sha512(byte[] content)
public static Hash hash(Hash.Algorithm algorithm, java.lang.String content)
public static Hash hash(Hash.Algorithm algorithm, byte[] content)
public java.lang.String toHex()
public Hash.IAlgorithm getAlgorithm()
public byte[] getBytes()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean validate(java.lang.String content)
public boolean validate(java.lang.String content,
java.nio.charset.Charset charset)
public boolean validate(byte[] content)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2015 Molindo GmbH. All Rights Reserved.