类 Encrypts

java.lang.Object
com.weicoder.common.crypto.base.BaseCrypt
com.weicoder.common.crypto.Encrypts
直接已知子类:
W.En

public class Encrypts extends BaseCrypt
对称加密类
作者:
WD
  • 构造器详细资料

    • Encrypts

      public Encrypts()
  • 方法详细资料

    • token

      public static String token(byte[] array)
      加密token方法
      参数:
      array - token转换的字符串
      返回:
      加密后的字符串
    • encrypt

      public static String encrypt(Object obj)
      加密
      参数:
      obj - 要加密的对象
      返回:
      加密后的字节数组
    • encrypt

      public static String encrypt(String text)
      加密字符串 Hex编码
      参数:
      text - 要加密的字符串
      返回:
      加密后的字节数组
    • encrypt

      public static byte[] encrypt(byte[] b)
      加密字符串
      参数:
      b - 要加密的字节数组
      返回:
      加密后的字节数组
    • encrypt

      public static byte[] encrypt(byte[] b, String key)
      加密字符串
      参数:
      b - 要加密的字节数组
      key - 加密key
      返回:
      加密后的字节数组
    • des

      public static byte[] des(byte[] b)
      可逆的加密算法 DES算法
      参数:
      b - 需要加密的字节数组
      返回:
      返回加密后的字节数组
    • des

      public static byte[] des(byte[] b, String key)
      可逆的加密算法 DES算法
      参数:
      b - 需要加密的字节数组
      key - 加密key
      返回:
      返回加密后的字节数组
    • aes

      public static byte[] aes(byte[] b)
      可逆的加密算法 AES算法
      参数:
      b - 需要加密的字节数组
      返回:
      返回加密后的字节数组
    • aes

      public static byte[] aes(byte[] b, String key)
      可逆的加密算法 AES算法
      参数:
      b - 需要加密的字节数组
      key - 加密key
      返回:
      返回加密后的字节数组
    • rc4

      public static byte[] rc4(byte[] b)
      可逆的加密算法 RC4算法
      参数:
      b - 需要加密的字节数组
      返回:
      返回加密后的字节数组
    • rc4

      public static byte[] rc4(byte[] b, String key)
      可逆的加密算法 RC4算法
      参数:
      b - 需要加密的字节数组
      key - 加密key
      返回:
      返回加密后的字节数组