//package com.tourism.webadmin.ws.utils;
//
//import cn.hutool.crypto.Mode;
//import cn.hutool.crypto.Padding;
//import cn.hutool.crypto.symmetric.AES;
//import com.tourism.common.additional.uuid.IdUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class AESUtils {
//    private String key = IdUtils.simpleUUID().substring(0,16);
//    private String iv = IdUtils.simpleUUID().substring(0,16);
//    @Bean
//    public AES instance(){
//        AES aes = new AES(Mode.CBC, Padding.PKCS5Padding, key.getBytes(), iv.getBytes());
//        return aes;
//    }
//    @Autowired
//    private AES aes;
//    public String encrypt(String content){
//        String encrypted = aes.encryptHex(content);
//        return encrypted;
//    }
//    public String decrypt(String encrypted){
//        String decryptStr = aes.decryptStr(encrypted);
//        return decryptStr;
//    }
//
//}
