|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.errai.bus.server.util.SecureHashUtil
public class SecureHashUtil
A utility class for producing secure hashes throughout the Errai code where needed.
Constructor Summary | |
---|---|
SecureHashUtil()
|
Method Summary | |
---|---|
static String |
hashToHexString(byte[] hash)
|
static String |
nextSecureHash()
Returns a new secure hash using the SHA-256 hash function salted with the SHA1PRNG random number generator. |
static String |
nextSecureHash(String algorithm)
Returns a new secure hash using the specified hash function salted with the SHA1PRNG random number generator. |
static String |
nextSecureHash(String algorithm,
byte[]... additionalSeed)
Get a new secure hash. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SecureHashUtil()
Method Detail |
---|
public static String nextSecureHash()
public static String nextSecureHash(String algorithm)
algorithm
- The hash function to use (SHA-1, SHA-256, MD5).
public static String nextSecureHash(String algorithm, byte[]... additionalSeed)
algorithm
- The hash function to use (SHA-1, SHA-256, MD5).additionalSeed
- A vararg of additional byte[] seeds to optionally add additional salts to the hash function.
public static String hashToHexString(byte[] hash)
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |