类 AesUtils

java.lang.Object
com.cdkjframework.util.encrypts.AesUtils

@Component public class AesUtils extends Object
  • 构造器详细资料

    • AesUtils

      public AesUtils(CustomConfig customConfig)
      构造函数
      参数:
      customConfig - 配置
  • 方法详细资料

    • base64Encode

      public static String base64Encode(String content)
      Base 64 编码
      参数:
      content - 加密内容
      返回:
      返回结果
    • encrypt

      public static byte[] encrypt(String content) throws Exception
      AES 加密
      参数:
      content - 加密内容
      返回:
      返回结果
      抛出:
      Exception - 异常信息
    • base64Decrypt

      public static String base64Decrypt(String content)
      Base 64 编码
      参数:
      content - 加密内容
      返回:
      返回结果
    • base64Decrypt

      public static String base64Decrypt(byte[] content)
      Base 64 编码
      参数:
      content - 加密内容
      返回:
      返回结果
    • decrypt

      public static String decrypt(String content) throws Exception
      AES解密
      参数:
      content - 解密内容
      返回:
      返回结果
      抛出:
      Exception - 异常信息
    • decrypt

      public static String decrypt(byte[] content) throws Exception
      AES解密
      参数:
      content - 解密内容
      返回:
      返回结果
      抛出:
      Exception - 异常信息