|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.caf.common.OldCipherUtil
public final class OldCipherUtil
Provides simple encrypt/decrypt functionality for the portal. Used to encrypt database passwords
Constructor Summary | |
---|---|
OldCipherUtil()
|
Method Summary | |
---|---|
static String |
decrypt(String value)
Decrypts simple value |
static String |
encrypt(String value)
Encrypts simple string value |
static String |
hash(String value)
Calculates SHA1 algorithm hash value |
static String |
hash(String value,
boolean forceHash)
Calculates SHA1 algorithm hash value |
static boolean |
hashEquals(String hash,
String value)
Checks if specified value hash is the same as passed in hash. |
static boolean |
isEncrypted(String value)
Returns true if passed value is encrypted |
static boolean |
isHash(String hash)
Returns true if the passed hash value does represent a valid SHA hash value |
static boolean |
isOldCipher(String value)
Is the encryption from the previous version of MWS. |
static boolean |
isOldHash(String hash)
Is the hash from the previous version of MWS. |
static void |
main(String[] argv)
main method used to encrypt an input at runtime. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OldCipherUtil()
Method Detail |
---|
public static String hash(String value) throws UnsupportedEncodingException
value
- input to be encrypted
UnsupportedEncodingException
- error if the character encoding is not supported.public static String hash(String value, boolean forceHash) throws UnsupportedEncodingException
value
- input to be encryptedforceHash
- encrypts value if true
UnsupportedEncodingException
public static boolean hashEquals(String hash, String value) throws UnsupportedEncodingException
hash
- input being compared to valuevalue
- input checked if it exists in hash
UnsupportedEncodingException
public static boolean isHash(String hash)
hash
- input being being checked if it is a valid SHA hash valuepublic static String encrypt(String value) throws Exception
value
- input to be encypted
Exception
public static boolean isEncrypted(String value)
value
- String to be checked if it is currently encrypted
public static String decrypt(String value) throws Exception
value
- decrypts if value is valid SHA hash
Exception
public static void main(String[] argv) throws Exception
argv
- value to encrypt
Exception
public static boolean isOldCipher(String value)
value
- encryped value.
public static boolean isOldHash(String hash)
hash
- hash value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |