类 EncryptUtils

java.lang.Object
cn.ezeyc.edpenc.util.EncryptUtils

public class EncryptUtils extends Object
作者:
wz
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final char[]
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static byte[]
    de(byte[] msg, char[] key, int type)
    解密
    static byte[]
    deAes(byte[] msg, char[] key)
    AES解密
    static byte[]
    deSimple(byte[] msg, char[] key)
    解密
    static byte[]
    deSimple(byte[] msg, int start, int end, char[] key)
    解密
    static byte[]
    en(byte[] msg, char[] key, int type)
    加密
    static byte[]
    enAes(byte[] msg, char[] key)
    AES加密字节
    static byte[]
    enSimple(byte[] msg, char[] key)
    加密
    static byte[]
    enSimple(byte[] msg, int start, int end, char[] key)
    加密
    static char[]
    md5(char[] str)
    md5
    static char[]
    md5(char[] str, boolean sh0rt)
    md5
    static byte[]
    md5byte(char[] str)
    md5加密
    static char[]
    randChar(int lenght)
    随机字串

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • SALT

      public static final char[] SALT
  • 构造器详细资料

    • EncryptUtils

      public EncryptUtils()
  • 方法详细资料

    • en

      public static byte[] en(byte[] msg, char[] key, int type)
      加密
      参数:
      msg - 内容
      key - 密钥
      type - 类型
      返回:
      密文
    • de

      public static byte[] de(byte[] msg, char[] key, int type)
      解密
      参数:
      msg - 密文
      key - 密钥
      type - 类型
      返回:
      明文
    • md5byte

      public static byte[] md5byte(char[] str)
      md5加密
      参数:
      str - 字符串
      返回:
      md5字串
    • md5

      public static char[] md5(char[] str)
      md5
      参数:
      str - 字串
      返回:
      32位md5
    • md5

      public static char[] md5(char[] str, boolean sh0rt)
      md5
      参数:
      str - 字串
      sh0rt - 是否16位
      返回:
      32位/16位md5
    • enSimple

      public static byte[] enSimple(byte[] msg, int start, int end, char[] key)
      加密
      参数:
      msg - 加密报文
      start - 开始位置
      end - 结束位置
      key - 密钥
      返回:
      加密后的字节
    • deSimple

      public static byte[] deSimple(byte[] msg, int start, int end, char[] key)
      解密
      参数:
      msg - 加密报文
      start - 开始位置
      end - 结束位置
      key - 密钥
      返回:
      解密后的字节
    • enSimple

      public static byte[] enSimple(byte[] msg, char[] key)
      加密
      参数:
      msg - 加密报文
      key - 密钥
      返回:
      加密后的字节
    • deSimple

      public static byte[] deSimple(byte[] msg, char[] key)
      解密
      参数:
      msg - 加密报文
      key - 密钥
      返回:
      解密后的字节
    • enAes

      public static byte[] enAes(byte[] msg, char[] key)
      AES加密字节
      参数:
      msg - 字节数组
      key - 密钥
      返回:
      加密后的字节
    • deAes

      public static byte[] deAes(byte[] msg, char[] key)
      AES解密
      参数:
      msg - 要解密的字节
      key - 密钥
      返回:
      明文字节
    • randChar

      public static char[] randChar(int lenght)
      随机字串
      参数:
      lenght - 长度
      返回:
      字符数组