public class SHA256 extends Object
| Constructor and Description |
|---|
SHA256() |
| Modifier and Type | Method and Description |
|---|---|
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(String userName,
char[] password)
Calculate the hash of a password by prepending the user name and a '@'
character.
|
public static byte[] getHashWithSalt(byte[] data,
byte[] salt)
data - the data to hashsalt - the salt to usepublic static byte[] getKeyPasswordHash(String userName, char[] password)
userName - the user namepassword - the passwordpublic static byte[] getHash(byte[] data,
boolean nullData)
data - the data to hashnullData - if the data should be filled with zeros after calculating
the hash codeCopyright © 2012 JBoss by Red Hat. All Rights Reserved.