public abstract class DESSecurityUtils extends Object
| 构造器和说明 |
|---|
DESSecurityUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Cipher |
createDencryptCipher(String keyValue) |
static Cipher |
createEncryptCipher(String keyValue) |
static byte[] |
decrypt(byte[] arrB,
String keyValue)
解密字节数组
|
static String |
decryptBase64String(String str,
String keyValue)
用base64解码再用Des解密
|
static byte[] |
encrypt(byte[] arrB,
String keyValue)
加密字节数组
|
static String |
encryptAndBase64(String str,
String keyValue)
用Des加密再用base64编码
|
public static Cipher createEncryptCipher(String keyValue) throws GeneralSecurityException
public static Cipher createDencryptCipher(String keyValue) throws GeneralSecurityException
public static byte[] encrypt(byte[] arrB,
String keyValue)
throws GeneralSecurityException
arrB - 需加密的字节数组keyValue - 密码GeneralSecurityException - 异常public static byte[] decrypt(byte[] arrB,
String keyValue)
throws GeneralSecurityException
arrB - 需解密的字节数组keyValue - 密码GeneralSecurityException - 异常public static String encryptAndBase64(String str, String keyValue)
str - 需加密的字节数组keyValue - 密码Copyright © 2017. All rights reserved.