JaasSecurityDomainMBean securityDomain = (JaasSecurityDomainMBean)
MBeanServerInvocationHandler.newProxyInstance(server, serviceName,
JaasSecurityDomainMBean.class, false);
// Invoke the jaasSecurityDomain.decodeb64 op
byte[] secret = securityDomain.decode64(password);
// Convert to UTF-8 base char array
String secretPassword = new String(secret, "UTF-8");
return secretPassword.toCharArray();
}
public static char[] decode(String password, ObjectName serviceName)