类 ApiCryptoUtil

java.lang.Object
org.springblade.core.api.crypto.util.ApiCryptoUtil

public class ApiCryptoUtil extends Object

辅助检测工具类

作者:
licoy.cn, L.cm
  • 构造器详细资料

    • ApiCryptoUtil

      public ApiCryptoUtil()
  • 方法详细资料

    • getEncryptInfo

      @Nullable public static CryptoInfoBean getEncryptInfo(org.springframework.core.MethodParameter methodParameter)
      获取方法控制器上的加密注解信息
      参数:
      methodParameter - 控制器方法
      返回:
      加密注解信息
    • getDecryptInfo

      @Nullable public static CryptoInfoBean getDecryptInfo(org.springframework.core.MethodParameter methodParameter)
      获取方法控制器上的解密注解信息
      参数:
      methodParameter - 控制器方法
      返回:
      加密注解信息
    • encryptData

      public static String encryptData(ApiCryptoProperties properties, byte[] jsonData, CryptoInfoBean infoBean)
      选择加密方式并进行加密
      参数:
      jsonData - json 数据
      infoBean - 加密信息
      返回:
      加密结果
    • decryptData

      public static byte[] decryptData(ApiCryptoProperties properties, byte[] bodyData, CryptoInfoBean infoBean)
      选择加密方式并进行解密
      参数:
      bodyData - byte array
      infoBean - 加密信息
      返回:
      解密结果