public class Hash extends 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(String hex,
Hash.IAlgorithm algorithm) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Hash.IAlgorithm |
getAlgorithm() |
byte[] |
getBytes() |
static Hash |
hash(Hash.Algorithm algorithm,
byte[] content) |
static Hash |
hash(Hash.Algorithm algorithm,
String content) |
int |
hashCode() |
static Hash |
md5(byte[] content) |
static Hash |
md5(String content) |
static Hash |
sha256(byte[] content) |
static Hash |
sha256(String content) |
static Hash |
sha512(byte[] content) |
static Hash |
sha512(String content) |
String |
toHex() |
String |
toString() |
boolean |
validate(byte[] content) |
boolean |
validate(String content) |
boolean |
validate(String content,
Charset charset) |
public Hash(String hex, Hash.IAlgorithm algorithm)
public Hash(byte[] bytes,
Hash.IAlgorithm algorithm)
public static Hash md5(byte[] content)
public static Hash sha256(byte[] content)
public static Hash sha512(byte[] content)
public static Hash hash(Hash.Algorithm algorithm, String content)
public static Hash hash(Hash.Algorithm algorithm, byte[] content)
public String toHex()
public Hash.IAlgorithm getAlgorithm()
public byte[] getBytes()
public boolean validate(String content)
public boolean validate(byte[] content)
Copyright © 2014 Molindo GmbH. All Rights Reserved.