com.denimgroup.threadfix.util.EncryptDecryptUtil Maven / Gradle / Ivy
package com.denimgroup.threadfix.util;
import org.owasp.esapi.ESAPI;
import org.owasp.esapi.errors.EncryptionException;
/**
* Created by jtomsett on 6/14/2016.
*/
public class EncryptDecryptUtil {
public static String decrypt(String encryptedString){
if(encryptedString == null){
return null;
}
try {
return ESAPI.encryptor().decrypt(encryptedString);
}catch (EncryptionException e){
return null;
}
}
public static String encrypt(String insecureString){
if(insecureString == null){
return null;
}
try {
return ESAPI.encryptor().encrypt(insecureString);
}catch (EncryptionException e){
return null;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy