be.personify.iam.frontend.wicket.util.CryptUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of personify-frontend Show documentation
Show all versions of personify-frontend Show documentation
frontend library for different usages
package be.personify.iam.frontend.wicket.util;
import org.springframework.security.crypto.encrypt.Encryptors;
import org.springframework.security.crypto.encrypt.TextEncryptor;
public class CryptUtils {
private static final String password = "gaanMetDieBanaan";
public static String encrypt(String plainText, String salt) {
TextEncryptor encryptor = Encryptors.text(password, salt);
return encryptor.encrypt(plainText);
}
public static String decrypt(String encryptedText, String salt) {
TextEncryptor encryptor = Encryptors.text(password, salt);
return encryptor.decrypt(encryptedText);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy