public class EncryptionKit extends Object
| 构造器和说明 |
|---|
EncryptionKit() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
base64Decode(byte[] bytes)
base64解码
|
static String |
base64Encode(byte[] bytes)
base64编码
|
static String |
encode(String algorithm,
byte[] bytes,
boolean toLowerCase)
使用直接算法进行字符串加密
|
static String |
md5Encode(byte[] bytes,
boolean toLowerCase)
md5编码
|
static String |
sha1Encode(byte[] bytes,
boolean toLowerCase)
sha1编码
|
public static byte[] base64Decode(byte[] bytes)
bytes - 解码字符串的字节数组public static String base64Encode(byte[] bytes)
bytes - 被加密字符串的字节数组public static String md5Encode(byte[] bytes, boolean toLowerCase)
bytes - 被加密字符串的字节数组toLowerCase - true 转换成小写格式 , false 转换成大写格式public static String sha1Encode(byte[] bytes, boolean toLowerCase)
bytes - 被加密字符串的字节数组toLowerCase - true 转换成小写格式 , false 转换成大写格式Copyright © 2019. All rights reserved.