use of org.pentaho.platform.api.util.IPasswordService in project pentaho-platform by pentaho.
the class PasswordServiceTest method testPasswordService.
public void testPasswordService() {
// $NON-NLS-1$
String password = "password";
IPasswordService passwordService = new KettlePasswordService();
String encryptedPassword = null;
try {
encryptedPassword = passwordService.encrypt(password);
String decryptedPassword = passwordService.decrypt(encryptedPassword);
assertEquals(password, decryptedPassword);
} catch (PasswordServiceException pse) {
// $NON-NLS-1$
fail("should not have thrown the exception");
pse.printStackTrace();
}
}
Aggregations