|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.core.util.obfuscation.Obfuscator
public final class Obfuscator
This class makes available methods for obfuscating a string in the very same way
as the org.jboss.resource.security.SecureIdentityLoginModule in JBossAS 4.2.3.
This is to ensure backwards compatibility in case we switch containers that would start obfuscating the password in a different way and also to make those methods available to other code. The original methods in the SecureIdentityLoginModule are marked private.
| Method Summary | |
|---|---|
static String |
decode(String secret)
Decodes the string obfuscated using the encode(String) method back to the
original value. |
static String |
encode(String secret)
Encodes the secret string so that the value is not immediately readable by a "casual viewer". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String encode(String secret)
throws NoSuchPaddingException,
NoSuchAlgorithmException,
InvalidKeyException,
BadPaddingException,
IllegalBlockSizeException
secret - the string to encode
NoSuchPaddingException
NoSuchAlgorithmException
InvalidKeyException
BadPaddingException
IllegalBlockSizeException
public static String decode(String secret)
throws NoSuchPaddingException,
NoSuchAlgorithmException,
InvalidKeyException,
BadPaddingException,
IllegalBlockSizeException
encode(String) method back to the
original value.
This method differs from its original org.jboss.resource.security.SecureIdentityLoginModule#decode
private method in that it returns a String whereas the original method returns a char[].
secret - the encoded (obfuscated) string
NoSuchPaddingException
NoSuchAlgorithmException
InvalidKeyException
BadPaddingException
IllegalBlockSizeException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||