public final class Hash extends Object
| Modifier and Type | Method and Description |
|---|---|
Hash |
addSalt(byte[] salt)
Add the salt to the current hash.
|
Hash |
addSalt(CharSequence salt)
Add the salt to the current hash.
|
Hash |
addSalt(CharSequence salt,
String encoding)
Add the salt to the current hash.
|
byte[] |
getBytes()
Get the current hash bytes.
|
int |
getLength()
Get the hash length.
|
boolean |
matches(byte[] hash)
Check if the current hash bytes are equal to the specified bytes.
|
public int getLength()
public Hash addSalt(byte[] salt)
salt - the salt.public Hash addSalt(CharSequence salt)
salt - the salt.public Hash addSalt(CharSequence salt, String encoding)
salt - the salt.encoding - an encoding of the salt.public byte[] getBytes()
public boolean matches(byte[] hash)
hash - the specified bytes.Copyright © 2017. All rights reserved.