public class SecurityUtils extends Object
| Constructor and Description |
|---|
SecurityUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
hashTo(String val,
String strategy)
Returns a BigInteger representation of a hash of 'val'.
|
static String |
hashToMD5(String val)
Returns a BigInteger representation of a hash of 'val'.
|
static String |
hashToSHA1(String val) |
static String |
hashToSHA256(String val)
Returns a BigInteger representation of a hash of 'val'.
|
public static String hashTo(String val, String strategy) throws UnsupportedOperationException
val - the value to hashstrategy - currently supported a MD5 and SHA-256UnsupportedOperationException - if there was a problem performing hashingpublic static String hashToMD5(String val) throws UnsupportedOperationException
val - the value to hashUnsupportedOperationException - if there was a problem performing hashing
strategy defaults to MD5 hashingpublic static String hashToSHA256(String val) throws UnsupportedOperationException
val - the value to hashUnsupportedOperationException - if there was a problem performing hashing
strategy defaults to SHA256 hashingpublic static String hashToSHA1(String val) throws UnsupportedOperationException
UnsupportedOperationExceptionCopyright © 2015. All rights reserved.