資源簡介
StreamCipher.rar

代碼片段和文件信息
//?測試文件:test.txt
#include?
#include?
#include?“LFSR.h“
int?main()
{
FILE?*in?*out;
char?fileName[32];
char?initStat[5];
printf(“請輸入源文件路徑:“);
gets(fileName);
in?=?fopen(fileName?“rb“);
if?(!in)
{
printf(“打開源文件失??!\n“);
exit(-1);
}
out?=?fopen(“ciphertext.txt“?“wb“);
printf(“請輸入初始狀態(如10010):“);
gets(initStat);
printf(“密鑰序列:\n“);
ShowKeyStream(initStat);
LFSR_encrypt(in?out?initStat);
printf(“加密完成!\n加密后密文文件:ciphertext.txt\n“);
fclose(in);
in?=?fopen(“ciphertext.txt“?“rb“);
out?=?fopen(“plaintext.txt“?“wb“);
LFSR_decrypt(in?out?initStat);
printf(“解密完成!\n解密后明文文件:plaintext.txt\n“);
fclose(in);
return?0;
}
????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????772??2014-12-01?09:57??StreamCipher\ciphertext.txt
?????文件???????6640??2014-12-01?09:56??StreamCipher\Debug\LFSR.obj
?????文件???????4842??2014-12-01?09:46??StreamCipher\Debug\main.obj
?????文件?????180296??2014-12-01?09:57??StreamCipher\Debug\StreamCipher.exe
?????文件?????203864??2014-12-01?09:57??StreamCipher\Debug\StreamCipher.ilk
?????文件?????190768??2014-11-30?15:57??StreamCipher\Debug\StreamCipher.pch
?????文件?????467968??2014-12-01?09:55??StreamCipher\Debug\StreamCipher.pdb
?????文件??????41984??2014-12-01?09:57??StreamCipher\Debug\vc60.idb
?????文件??????53248??2014-12-01?09:55??StreamCipher\Debug\vc60.pdb
?????文件???????2233??2014-12-01?09:55??StreamCipher\LFSR.CPP
?????文件????????298??2014-12-01?09:46??StreamCipher\LFSR.H
?????文件????????763??2014-12-01?09:57??StreamCipher\main.cpp
?????文件????????772??2014-12-01?09:57??StreamCipher\plaintext.txt
?????文件???????4462??2014-11-30?20:56??StreamCipher\StreamCipher.dsp
?????文件????????549??2014-11-13?21:40??StreamCipher\StreamCipher.dsw
?????文件??????50176??2014-12-01?09:57??StreamCipher\StreamCipher.ncb
?????文件??????53760??2014-12-01?09:57??StreamCipher\StreamCipher.opt
?????文件????????931??2014-12-01?09:57??StreamCipher\StreamCipher.plg
?????文件????????772??2014-12-01?09:35??StreamCipher\test.txt
?????目錄??????????0??2014-12-01?09:55??StreamCipher\Debug
?????目錄??????????0??2014-12-01?09:57??StreamCipher
-----------?---------??----------?-----??----
??????????????1265098????????????????????21
- 上一篇:opencv幀差法檢測運動目標
- 下一篇:RTDS仿真模型介紹.pptx
評論
共有 條評論