public class DESUtil extends Object
| Constructor and Description |
|---|
DESUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
base64Encode(byte[] src)
BASE64 编码(byte[]).
|
static byte[] |
decrypt(byte[] src,
byte[] key)
解密
|
static String |
decrypt(String data,
String cryptKey)
密码解密
|
static byte[] |
encrypt(byte[] src,
byte[] key)
加密
|
static String |
encrypt(String password,
String cryptKey)
密码加密
|
public static byte[] encrypt(byte[] src,
byte[] key)
throws Exception
src - 数据源key - 密钥,长度必须是8的倍数Exceptionpublic static byte[] decrypt(byte[] src,
byte[] key)
throws Exception
src - 数据源key - 密钥,长度必须是8的倍数Exceptionpublic static final String decrypt(String data, String cryptKey)
data - Exceptionpublic static final String encrypt(String password, String cryptKey)
password - Exceptionpublic static String base64Encode(byte[] src)
src - byte[] inputed stringCopyright © 2021. All rights reserved.