|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.crypto.PasswordUtil
public class PasswordUtil
Password related utilities.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_CRYPTO_KEY
|
static java.lang.String |
PROPERTY_HASH_ALGORITHM
|
static java.lang.String |
PROPERTY_HASH_ENCODED
|
static java.lang.String |
PROPERTY_HASH_ITERATION
|
static java.lang.String |
PROPERTY_HASH_LENGTH
|
static java.lang.String |
PROPERTY_HASH_SALT
|
Constructor Summary | |
---|---|
PasswordUtil()
|
Method Summary | |
---|---|
static java.lang.String |
decode(java.lang.String encoded_string)
Decode the provided password. |
static java.lang.String |
encode_password(java.lang.String decoded_string,
java.lang.String crypto_algorithm,
java.util.Map<java.lang.String,java.lang.String> properties)
Encode the raw input with the provided algorithm. |
static java.lang.String |
encode(java.lang.String decoded_string)
Encode the provided password. |
static java.lang.String |
encode(java.lang.String decoded_string,
java.lang.String crypto_algorithm)
Encode the provided password with the input algorithm. |
static java.lang.String |
encode(java.lang.String decoded_string,
java.lang.String crypto_algorithm,
java.util.Map<java.lang.String,java.lang.String> properties)
|
static java.lang.String |
encode(java.lang.String decoded_string,
java.lang.String crypto_algorithm,
java.lang.String crypto_key)
Encode the provided password with the input algorithm. |
static java.lang.String |
getCryptoAlgorithm(java.lang.String password)
Determine the crypto algorithm inside the provided password, ie {xor}blah returns "xor". |
static java.lang.String |
getCryptoAlgorithmTag(java.lang.String password)
Get any algorithm tag found in the input data. |
static java.lang.String |
getDefaultEncoding()
|
static boolean |
isEncrypted(java.lang.String encoded_string)
Check whether the password has a valid crypto algorithm applied. |
static boolean |
isHashed(java.lang.String encodedString)
Determine if the provided algorithm tag is a valid supported one or not. |
static boolean |
isValidCryptoAlgorithm(java.lang.String crypto_algorithm)
Determine if the provided algorithm string is a valid one. |
static boolean |
isValidCryptoAlgorithmTag(java.lang.String tag)
Determine if the provided algorithm tag is a valid supported one or not. |
static java.lang.String |
passwordDecode(java.lang.String encoded_string)
Decode the provided password string. |
static java.lang.String |
passwordEncode(java.lang.String decoded_string)
Encode the provided password with the default algorithm. |
static java.lang.String |
passwordEncode(java.lang.String decoded_string,
java.lang.String crypto_algorithm)
Encode the provided password with the input algorithm. |
static java.lang.String |
removeCryptoAlgorithmTag(java.lang.String password)
Remove the algorithm tag from the input encoded password. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_CRYPTO_KEY
public static final java.lang.String PROPERTY_HASH_ALGORITHM
public static final java.lang.String PROPERTY_HASH_ITERATION
public static final java.lang.String PROPERTY_HASH_SALT
public static final java.lang.String PROPERTY_HASH_ENCODED
public static final java.lang.String PROPERTY_HASH_LENGTH
Constructor Detail |
---|
public PasswordUtil()
Method Detail |
---|
public static final java.lang.String getDefaultEncoding()
public static java.lang.String decode(java.lang.String encoded_string) throws InvalidPasswordDecodingException, com.ibm.ws.crypto.util.UnsupportedCryptoAlgorithmException
encoded_string
-
InvalidPasswordDecodingException
com.ibm.ws.crypto.util.UnsupportedCryptoAlgorithmException
public static java.lang.String encode(java.lang.String decoded_string) throws InvalidPasswordEncodingException, com.ibm.ws.crypto.util.UnsupportedCryptoAlgorithmException
decoded_string
-
InvalidPasswordEncodingException
com.ibm.ws.crypto.util.UnsupportedCryptoAlgorithmException
public static java.lang.String encode(java.lang.String decoded_string, java.lang.String crypto_algorithm) throws InvalidPasswordEncodingException, com.ibm.ws.crypto.util.UnsupportedCryptoAlgorithmException
decoded_string
- crypto_algorithm
-
com.ibm.ws.crypto.util.UnsupportedCryptoAlgorithmException
InvalidPasswordEncodingException
public static java.lang.String encode(java.lang.String decoded_string, java.lang.String crypto_algorithm, java.lang.String crypto_key) throws InvalidPasswordEncodingException, com.ibm.ws.crypto.util.UnsupportedCryptoAlgorithmException
decoded_string
- crypto_algorithm
- crypto_key
-
InvalidPasswordEncodingException
com.ibm.ws.crypto.util.UnsupportedCryptoAlgorithmException
public static java.lang.String encode(java.lang.String decoded_string, java.lang.String crypto_algorithm, java.util.Map<java.lang.String,java.lang.String> properties) throws InvalidPasswordEncodingException, com.ibm.ws.crypto.util.UnsupportedCryptoAlgorithmException
InvalidPasswordEncodingException
com.ibm.ws.crypto.util.UnsupportedCryptoAlgorithmException
public static java.lang.String getCryptoAlgorithm(java.lang.String password)
password
-
public static java.lang.String getCryptoAlgorithmTag(java.lang.String password)
password
-
public static boolean isEncrypted(java.lang.String encoded_string)
encoded_string
-
public static boolean isValidCryptoAlgorithm(java.lang.String crypto_algorithm)
crypto_algorithm
-
public static boolean isValidCryptoAlgorithmTag(java.lang.String tag)
tag
-
public static boolean isHashed(java.lang.String encodedString)
tag
-
public static java.lang.String passwordDecode(java.lang.String encoded_string)
encoded_string
-
public static java.lang.String passwordEncode(java.lang.String decoded_string)
decoded_string
-
public static java.lang.String passwordEncode(java.lang.String decoded_string, java.lang.String crypto_algorithm)
decoded_string
- crypto_algorithm
-
public static java.lang.String removeCryptoAlgorithmTag(java.lang.String password)
password
-
public static java.lang.String encode_password(java.lang.String decoded_string, java.lang.String crypto_algorithm, java.util.Map<java.lang.String,java.lang.String> properties)
decoded_string
- crypto_algorithm
- crypto_key
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |