//
//import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
//import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;
//import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
//
//public class EncryptUtil {
//    public static void main(String[] args) {
////        StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
////        encryptor.setPassword("dsfserrfqw3421rds"); // 设置密钥
////        encryptor.setAlgorithm("PBEWithMD5AndDES"); // 或 AES
////
////        String encrypted = encryptor.encrypt("123");
////        System.out.println("Encrypted: " + encrypted);
////        System.out.println(encryptor.decrypt(encrypted));
//
//        PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
//
//        SimpleStringPBEConfig config = new SimpleStringPBEConfig();
//        config.setPassword("fgyuajrdyujr6ydhserghj7tthse446y");
//        config.setAlgorithm("PBEWITHHMACSHA512ANDAES_256"); // 算法做了更新
//        config.setKeyObtentionIterations("1000");
//        config.setPoolSize("1");
//        config.setProviderName("SunJCE");
//        config.setSaltGeneratorClassName("org.jasypt.salt.RandomSaltGenerator");
//        config.setIvGeneratorClassName("org.jasypt.iv.RandomIvGenerator");
//        config.setStringOutputType("base64");
//        encryptor.setConfig(config);
//
//        System.out.println(encryptor.encrypt("admin"));
//
//    }
//}