|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.molindo.utils.data.Hash
public class Hash
| Nested Class Summary | |
|---|---|
static class |
Hash.Algorithm
|
static interface |
Hash.IAlgorithm
|
static interface |
Hash.IHashBuilder
|
| Constructor Summary | |
|---|---|
Hash(byte[] bytes,
Hash.IAlgorithm algorithm)
|
|
Hash(String hex,
Hash.IAlgorithm algorithm)
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Hash(String hex,
Hash.IAlgorithm algorithm)
public Hash(byte[] bytes,
Hash.IAlgorithm algorithm)
| Method Detail |
|---|
public static Hash md5(String content)
public static Hash md5(byte[] content)
public static Hash sha256(String content)
public static Hash sha256(byte[] content)
public static Hash sha512(String 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 String toString()
toString in class Objectpublic boolean validate(String content)
public boolean validate(String content,
Charset charset)
public boolean validate(byte[] content)
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||