|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.wizzardo.tools.security.Hash
public abstract class Hash
Created by wizzardo on 12.03.15.
| Constructor Summary | |
|---|---|
Hash(java.lang.String name)
|
|
| Method Summary | |
|---|---|
byte[] |
asBytes()
|
void |
asBytes(byte[] bytes)
|
void |
asBytes(byte[] bytes,
int offset)
|
java.lang.String |
asString()
|
boolean |
check(byte[] b,
byte[] hashBytes)
get hash from given bytes and check for equals it with hashBytes |
boolean |
check(java.lang.String value,
java.lang.String hashString)
get hash from given string and check for equals it with hashString |
protected abstract int |
hexStringLength()
|
protected java.security.MessageDigest |
init(java.lang.String name)
|
Hash |
reset()
|
java.lang.String |
toString()
|
Hash |
update(byte b)
|
Hash |
update(byte[] b)
|
Hash |
update(byte[] b,
int offset,
int length)
|
Hash |
update(java.io.InputStream in)
|
Hash |
update(java.lang.String s)
update hash with getBytes(UTF8) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Hash(java.lang.String name)
| Method Detail |
|---|
protected java.security.MessageDigest init(java.lang.String name)
protected abstract int hexStringLength()
public Hash update(byte[] b,
int offset,
int length)
public Hash reset()
public java.lang.String toString()
toString in class java.lang.Objectpublic Hash update(byte[] b)
public Hash update(java.lang.String s)
public Hash update(byte b)
public java.lang.String asString()
public byte[] asBytes()
public void asBytes(byte[] bytes)
public void asBytes(byte[] bytes,
int offset)
public Hash update(java.io.InputStream in)
throws java.io.IOException
java.io.IOException
public boolean check(java.lang.String value,
java.lang.String hashString)
public boolean check(byte[] b,
byte[] hashBytes)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||