資源簡介
C++做的文件加密器,可加密除 文件夾 以外的任何文件,壓縮包內含程序源代碼、可執行程序,使用說明

代碼片段和文件信息
#include?
#include?
using?namespace?std;
int?_tmain(int?argc?_TCHAR*?argv[])
{
//1.打開源(待加密)文件
// char?srcFileName[256]?=?{?0?};
char?dstFileName[256]?=?{?0?};
fstream?srcFile?dstFile;
// printf(“請輸入待加密文件名:“);
// scanf(“%s“?srcFileName);
// 讀?????????二進制
srcFile.open(argv[1]?ios::in?|?ios::binary);
//2.創建目的(加密后)文件
printf(“請輸入加密后文件名:“);
scanf(“%s“?dstFileName);
// 讀?????????二進制
dstFile.open(dstFileName?ios::out?|?ios::binary);
//3.讀取源文件內容????加密???寫入目的文件
//3.1?獲取文件大小
//3.1.1?設置文件內容指針到文件末尾
srcFile.seekg(0?ios::end);
//3.1.2?獲取文件內容指針到文件頭的字節數
std::streamoff?size?=?srcFile.tellg();
//3.1.3?設置文件內容指針到文件頭
srcFile.seekg(0?ios::beg);
//3.2?循環讀取?加密?寫入
//char?buff;
for?(std::streamoff?i?=?0;?i? dstFile.put(srcFile.get()?^?0x66);
/*
#if?0
//3.2.1?讀取
buff?=?srcFile.get();
//3.2.2?加密
buff?^=?0x66;
//3.2.3?寫入
dstFile.put(buff);
#endif
*/
}
//4.關閉保存
srcFile.close();
dstFile.close();
return?0;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????..A..H.?????27136??2019-01-05?16:14??Universal?Encryption?Decryptor\.vs\Universal?Encryption?Decryptor\v15\.suo
?????文件????5623808??2019-01-05?16:14??Universal?Encryption?Decryptor\.vs\Universal?Encryption?Decryptor\v15\Browse.VC.db
?????文件???31522816??2019-01-05?16:14??Universal?Encryption?Decryptor\.vs\Universal?Encryption?Decryptor\v15\ipch\AutoPCH\a5c74b290d343c54\源.ipch
?????文件????1667072??2019-01-05?16:14??Universal?Encryption?Decryptor\Debug\Universal?Encryption?Decryptor.exe
?????文件????3896204??2019-01-05?16:15??Universal?Encryption?Decryptor\Debug\Universal?Encryption?Decryptor.ilk
?????文件????9211904??2019-01-05?16:14??Universal?Encryption?Decryptor\Debug\Universal?Encryption?Decryptor.pdb
?????文件????????826??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\Universa.4E08E668.tlog\CL.command.1.tlog
?????文件??????13434??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\Universa.4E08E668.tlog\CL.read.1.tlog
?????文件????????832??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\Universa.4E08E668.tlog\CL.write.1.tlog
?????文件???????1832??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\Universa.4E08E668.tlog\li
?????文件???????3426??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\Universa.4E08E668.tlog\li
?????文件???????1078??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\Universa.4E08E668.tlog\li
?????文件????????638??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\Universa.4E08E668.tlog\rc.command.1.tlog
?????文件???????2554??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\Universa.4E08E668.tlog\rc.read.1.tlog
?????文件????????518??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\Universa.4E08E668.tlog\rc.write.1.tlog
?????文件????????234??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\Universa.4E08E668.tlog\Universal?Encryption?Decryptor.lastbuildstate
?????文件????????538??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\Universal?Encryption?Decryptor.log
?????文件??????67740??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\Universal?Encryption?Decryptor.res
?????文件?????142336??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\vc141.idb
?????文件?????299008??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\vc141.pdb
?????文件?????552164??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Debug\源.obj
?????文件??????67646??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\lock.ico
?????文件????????466??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\resource.h
?????文件??????69824??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Universal?Encryption?Decryptor.aps
?????文件???????3224??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Universal?Encryption?Decryptor.rc
?????文件???????6261??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Universal?Encryption?Decryptor.vcxproj
?????文件???????1342??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Universal?Encryption?Decryptor.vcxproj.filters
?????文件????????165??2019-01-05?16:13??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\Universal?Encryption?Decryptor.vcxproj.user
?????文件???????1163??2019-01-05?16:14??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor\源.cpp
?????文件???????1503??2019-01-05?16:13??Universal?Encryption?Decryptor\Universal?Encryption?Decryptor.sln
............此處省略15個文件信息
- 上一篇:文本有關的說話人識別系統
- 下一篇:C語言實現2的指數次點的FFT
評論
共有 條評論