public final class PasswordMaskingUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BEGIN_ENC |
static String |
END_ENC |
Modifier and Type | Method and Description |
---|---|
static SensitiveDataCodec<String> |
getCodec(String codecDesc) |
static DefaultSensitiveStringCodec |
getDefaultCodec() |
static HashProcessor |
getHashProcessor() |
static HashProcessor |
getHashProcessor(String storedPassword) |
static boolean |
isEncMasked(String password) |
static String |
resolveMask(Boolean maskPassword,
String password,
String codecClass)
This method deals with password masking and returns the password in its plain text form.
|
static String |
unwrap(String password) |
static String |
wrap(String password) |
public static final String BEGIN_ENC
public static final String END_ENC
public static String resolveMask(Boolean maskPassword, String password, String codecClass) throws Exception
maskPassword
- : explicit mask flag. If it's true, the password is interpreted as
masked. If it is false, the password is interpreted as plain text.
if it is null, the password will be interpreted as masked if the
password is wrapped in ENC(), or as plain text otherwise.password
- : the original value of password stringcodecClass
- : the codec used to decode the password. Only when the password is interpreted
as masked will this codec be used. Ignored otherwise.Exception
public static boolean isEncMasked(String password)
public static HashProcessor getHashProcessor(String storedPassword) throws Exception
Exception
public static HashProcessor getHashProcessor()
public static SensitiveDataCodec<String> getCodec(String codecDesc) throws ActiveMQException
ActiveMQException
public static DefaultSensitiveStringCodec getDefaultCodec()
Copyright © 2018 JBoss by Red Hat. All rights reserved.