public void setPassword(Principal principal, PasswordCallback callback) throws IOException, AccountNotFoundException { // Let the read DB set the password _realPricipalDatabase.setPassword(principal, callback); // Retrieve the setpassword char[] plainPassword = callback.getPassword(); char[] hexPassword = toHex(plainPassword); callback.setPassword(hexPassword); }