类 HoneyBadgerEncrypt

  • 所有已实现的接口:
    org.springframework.beans.factory.InitializingBean

    public class HoneyBadgerEncrypt
    extends Object
    implements org.springframework.beans.factory.InitializingBean
    从以下版本开始:
    : 1.0.0
    作者:
    : longfa 蜜獾 还可以用来当作吉祥物品
    • 字段详细资料

      • AES_KEY

        public static byte[] AES_KEY
      • AES_IV

        public static byte[] AES_IV
      • sm4

        public static final cn.hutool.crypto.symmetric.SymmetricCrypto sm4
      • rsa

        public static cn.hutool.crypto.asymmetric.RSA rsa
      • aes

        public static cn.hutool.crypto.symmetric.AES aes
      • PRIVATE_KEY

        public static String PRIVATE_KEY
      • PUBLIC_KEY

        public static String PUBLIC_KEY
      • digester

        public static final cn.hutool.crypto.digest.Digester digester
    • 构造器详细资料

      • HoneyBadgerEncrypt

        public HoneyBadgerEncrypt()
    • 方法详细资料

      • afterPropertiesSet

        public void afterPropertiesSet()
        指定者:
        afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBean
      • aesEncrypt

        public String aesEncrypt​(String content)
        aes加密
        参数:
        content - 文本内容跟
        返回:
        加密字符串 16进制
      • aesDecrypt

        public String aesDecrypt​(String encrypt)
        aes解密
        参数:
        encrypt - 密文
        返回:
        明文
      • sm4Encrypt

        public String sm4Encrypt​(String context)
        SM4 国密
        参数:
        context - 明文
        返回:
        密文
      • sm4Decrypt

        public String sm4Decrypt​(String encrypt)
        过密算法 解密
        参数:
        encrypt - 密文
        返回:
        明文
      • rsaEncrypt

        public String rsaEncrypt​(String content)
        RSA非对称加密算法
        参数:
        content - 明文
        返回:
        密文
      • rsaDecrypt

        public String rsaDecrypt​(String encrypt)
        RSA非对称加密解密
        参数:
        encrypt - 密文
        返回:
        明文
      • sm3DigesterObject

        public String sm3DigesterObject​(String content)
      • sm3DigesterFile

        public String sm3DigesterFile​(File file)