password.addTag(tag);
}
}
// update password data, push others back in history if applicable
PasswordData updatePasswordData = updatePassword.getCurrentPasswordData();
String updatePasswordVal = updatePasswordData.getPassword();
// if user entered a password value and its not the same as the current one...
if (!"".equals(updatePasswordVal))
{
String currentPasswordVal = encryptor.decrypt(password.getCurrentPasswordData().getPassword());
if (!updatePasswordVal.equals(currentPasswordVal))
{
updatePasswordData.setUserCreated(loggedInUser);
updatePasswordData.setDateCreated(now);
updatePasswordData.setPassword(encryptor.encrypt(updatePasswordVal));
password.addPasswordData(updatePasswordData);
}
}
// trim history if not infinite
password.pruneDataHistory();