|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.security.SHA256
public class SHA256
This class implements the cryptographic hash function SHA-256.
Constructor Summary | |
---|---|
SHA256()
|
Method Summary | |
---|---|
static byte[] |
getHash(byte[] data,
boolean nullData)
Calculate the hash code for the given data. |
static byte[] |
getHashWithSalt(byte[] data,
byte[] salt)
Calculate the hash code by using the given salt. |
static byte[] |
getKeyPasswordHash(java.lang.String userName,
char[] password)
Calculate the hash of a password by prepending the user name and a '@' character. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SHA256()
Method Detail |
---|
public static byte[] getHashWithSalt(byte[] data, byte[] salt)
data
- the data to hashsalt
- the salt to use
public static byte[] getKeyPasswordHash(java.lang.String userName, char[] password)
userName
- the user namepassword
- the password
public static byte[] getHash(byte[] data, boolean nullData)
data
- the data to hashnullData
- if the data should be filled with zeros after calculating
the hash code
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |