public static String encryptPassword(String password) {
String pass = password;
try {
if (Validator.isValid(pass)) {
Cipher cipher = Cipher.getInstance();
byte[] coded = cipher.encrypt(pass.getBytes());
pass = Base64Coder.encrypt(coded);
}
} catch (Exception e) {
String error = "Erro ao cifrar a senha.";
Logger.error(error, e);