admin
2022-04-16 04f09e52ffd4681bdfd85e51acd3da0d1280c3d3
src/main/java/com/yeshi/buwan/util/AESUtil.java
@@ -1,22 +1,16 @@
package com.yeshi.buwan.util;
import javax.crypto.*;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.SecretKeySpec;
/**
 * AES加密解密
 * 
 * @author Administrator
 *
 */
public class AESUtil {
@@ -39,7 +33,7 @@
         cipher.init(Cipher.ENCRYPT_MODE, key);
         // 加密
         byte[] result = cipher.doFinal(byteContent);
         return (new sun.misc.BASE64Encoder()).encode(result);
            return StringUtil.getBase64FromByte(result);
      } catch (NoSuchAlgorithmException e) {
         e.printStackTrace();
      } catch (NoSuchPaddingException e) {