文件名称:DES
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:13.95kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
DES通用加密方法。首先,创建一个该工具类对象:如
DES des = new DES(key),其中key为位数大于8的密钥
其次,对原始信息data进行加密,直接调用encrypt方法,得到加密后的字符串,如
String encryptResult = des.encrypt(data) //得到加密后的数据字符串
最后,对加密后的字符串encryptResult解密,直接调用decrypt方法,可得到与原始数据data一致的字符串,如
String decryptResult = des.decrypt(encryptResult) //得到解密后的数据字符串
解密后的字符串decryptResult,与原始信息data一致。-General DES encryption method. First, create a class object of the tool: If DES des = new DES (key), where key is the key followed by more than 8 bits, the original information data is encrypted, encrypt method called directly to get the encrypted string such as String encryptResult = des.encrypt (data) // get the encrypted data string last, to decrypt the encrypted string encryptResult direct call decrypt method, available data consistent with the original data string, such as String decryptResult = des.decrypt (encryptResult) // get the decrypted data string decrypted string decryptResult, consistent with the original information data.
DES des = new DES(key),其中key为位数大于8的密钥
其次,对原始信息data进行加密,直接调用encrypt方法,得到加密后的字符串,如
String encryptResult = des.encrypt(data) //得到加密后的数据字符串
最后,对加密后的字符串encryptResult解密,直接调用decrypt方法,可得到与原始数据data一致的字符串,如
String decryptResult = des.decrypt(encryptResult) //得到解密后的数据字符串
解密后的字符串decryptResult,与原始信息data一致。-General DES encryption method. First, create a class object of the tool: If DES des = new DES (key), where key is the key followed by more than 8 bits, the original information data is encrypted, encrypt method called directly to get the encrypted string such as String encryptResult = des.encrypt (data) // get the encrypted data string last, to decrypt the encrypted string encryptResult direct call decrypt method, available data consistent with the original data string, such as String decryptResult = des.decrypt (encryptResult) // get the decrypted data string decrypted string decryptResult, consistent with the original information data.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.