All Downloads are FREE. Search and download functionalities are using the official Maven repository.

be.personify.iam.frontend.wicket.util.CryptUtils Maven / Gradle / Ivy

There is a newer version: 1.5.2.RELEASE
Show newest version
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