|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jdbwc.util.Security
public final class Security
Security methods for this package.
Method Summary | |
---|---|
static java.lang.String |
getHash(java.lang.String algorithm,
java.lang.String input)
Generate and return a MessageDigest hash for the String input. |
static java.lang.String |
getSecureString(java.lang.String input)
Return a secure String based on input. The leading chars are the salt. |
static java.lang.String |
rand(int aListSize)
Returns a Mixed-Character random value of given length. |
static java.lang.String |
rand(int aListSize,
boolean alphNumeric)
Returns an AlphaNumeric random value of given length. Suitable for user-names. |
static java.lang.String |
rand(int aListSize,
boolean alphNumericOnly,
boolean numericOnly)
Returns an AlphaNumeric random value of given length. Suitable for user-names. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getSecureString(java.lang.String input) throws java.sql.SQLException
input
- String to derive secure hash from.
java.sql.SQLException
public static java.lang.String getHash(java.lang.String algorithm, java.lang.String input) throws java.sql.SQLException
input
- String to derive MessageDigest from.algorithm
- Algorithm type EG: MD5, SHA-256, SHA-512
java.sql.SQLException
public static java.lang.String rand(int aListSize)
aListSize
- int - must be greater than 0.
public static java.lang.String rand(int aListSize, boolean alphNumeric)
aListSize
- int - must be greater than 0.alphNumeric
- If true, only AlphaNumeric characters are used,
otherwise mixed characters are used.public static java.lang.String rand(int aListSize, boolean alphNumericOnly, boolean numericOnly)
aListSize
- int - must be greater than 0.alphNumericOnly
- If true, only AlphaNumeric characters are used,
otherwise mixed characters are used.numericOnly
- If true only numbers will be used. This takes precedent over alphNumericOnly.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |