最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
文件加密&字符加密的代码
时间:2022-07-02 12:15:01 编辑:袖梨 来源:一聚教程网
///
///desKey: DES的密钥;desIV: DES向量
class encrypfile{
public byte[] desKey;
public byte[] desIV;
public encrypfile(byte[] inputKey,byte[] inputIV){
desKey=inputKey;
desIV=inputIV;
}
///
///inName:被加密文件名;outName: 加密后文件名
public void begintoencry(string inName,string outName){
FileStream fin = new FileStream(inName, FileMode.Open, FileAccess.Read);
FileStream fout = new FileStream(outName, FileMode.OpenOrCreate, FileAccess.Write);
fout.SetLength(0);
byte[] bin = new byte[100]; //This is intermediate storage for the encryption.
long rdlen = 0; //This is the total number of bytes written.
long totlen = fin.Length; //This is the total length of the input file.
int len; //This is the number of bytes to be written at a time.
相关文章
- 奇迹暖暖妙笔生花完美搭配攻略 04-29
- 汉字找茬王臭味和美味攻略 04-29
- 神奇海洋4月28日答案 海狼军团是哪种鱼类 04-29
- 拳无拳意无意是形意拳还是无影脚 蚂蚁新村今日答案4月28日 04-29
- 小鸡宝宝考考你:水果吃起来越甜说明含糖量越高吗 蚂蚁庄园4月30日答案早知道 04-29
- 以下哪种海洋生物能够聚集成礁,起到防波固堤的作用 神奇海洋4月29日答案最新 04-29