一个java的DES加解密类转换成C#3
日期:2013-10-22 11:27
public static String encrypt(String xml) throws Exception {
return encrypt(xml, strDefaultKey);
}
/**
* 解密字节数组
*
* @param arrB
* 需解密的字节数组
* @param key
* 密钥
* @return 解密后的字节数组
* @throws Exception
*/
public static byte[] decrypt(byte[] arrB, String key) throws Exception {
DESKeySpec desKeySpec = new DESKeySpec(key.getBytes());
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(DES);
1/3 下一页 上一页 首页 尾页
返回
刷新
WAP首页
网页版
登录
05/03 19:57