byte[] encrypted; try { encrypted = PasswordBasedEncryption.encrypt(algo, new String(password).getBytes(), masterPassword, iterationCount, salt); } catch (GeneralSecurityException ex) {
byte[] pwd; try { pwd = PasswordBasedEncryption.decrypt(algo, cipherText, masterPassword, iterationCount, salt); } catch (GeneralSecurityException ex) { throw new PasswordResolverException("could not decrypt the password: " + ex.getMessage());