程序包 cn.godmao.utils

类 AESUtil

java.lang.Object
cn.godmao.utils.AESUtil

public class AESUtil extends Object
  • 构造器详细资料

    • AESUtil

      public AESUtil()
  • 方法详细资料

    • encode

      public static byte[] encode(byte[] secret, byte[] content) throws Exception
      抛出:
      Exception
    • decode

      public static byte[] decode(byte[] secret, byte[] content) throws Exception
      抛出:
      Exception
    • decrypt

      public static String decrypt(String data, String key, String iv, String encodingFormat) throws Exception
      AES解密
      参数:
      data - //密文,被加密的数据
      key - //秘钥
      iv - //偏移量
      encodingFormat - //解密后的结果需要进行的编码
      返回:
      抛出:
      Exception