类 EncryptUtils
java.lang.Object
cn.ezeyc.edpenc.util.EncryptUtils
- 作者:
- wz
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明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) md5static char[]md5(char[] str, boolean sh0rt) md5static byte[]md5byte(char[] str) md5加密static char[]randChar(int lenght) 随机字串
-
字段详细资料
-
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- 长度- 返回:
- 字符数组
-