91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 11.48MB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-07-21
  • 語言: 其他
  • 標(biāo)簽:

資源簡介

利用CryptoAPI進(jìn)行文件的加解密以及簽名和驗證服務(wù),文件包括附錄ppt

資源截圖

代碼片段和文件信息

#include?“stdafx.h“?
#include?
#include?
#include?
#define?MY_ENCODING_TYPE??(PKCS_7_ASN_ENCODING?|?X509_ASN_ENCODING)
#define?KEYLENGTH??0x00800000
void?HandleError(char?*s);
//--------------------------------------------------------------------
//??These?additional?#define?statements?are?required.
#define?ENCRYPT_ALGORITHM?CALG_RC4?
#define?ENCRYPT_BLOCK_SIZE?8?
#define?MAX_FILE_SIZE?4000000
#define?SIGNATURE_SIZE?500
BYTE?*pbKeyBlob;??//用來保存導(dǎo)出的公鑰
DWORD?dwBlobLen;
//???Declare?the?functions.?The?function?definition
//???follows?main.
BOOL?VerifyFile?(
?????PCHAR?szSource???????
?????PCHAR?szDestination);
BOOL?SignFile???(
?????PCHAR?szSource???????
?????PCHAR?szDestination);
BOOL?DecryptFile(
?????PCHAR?szSource?
?????PCHAR?szDestination?
?????PCHAR?szPassword);?
BOOL?EncryptFile(
?????PCHAR?szSource?
?????PCHAR?szDestination?
?????PCHAR?szPassword);?
//--------------------------------------------------------------------
//???Begin?main.
int?main()
{?
?CHAR?szSource[100];?
?CHAR?szDestination[100];?
?CHAR?szPassword[100];?
?int?Service;
?char?judge;?
?bool?DoOrNot=true;
?do{
?printf(“**************************************************************\n“);
?printf(“請選擇服務(wù)開始項:\n“);
?printf(“1.加密\t2.解密\n3.簽名\t4.驗證\n“);
?scanf(“%d“&Service);
?switch(Service){
?case?1:
?//--------------------------------------------------------------------
?//?Call?EncryptFile?to?do?the?actual?encryption.?加密文件
?printf(“\n------------------------------------------------------------\n“);
?printf(“\n\n1.Encrypt?a?file.?\n\n“);
?printf(“\nEnter?the?name?of?the?file?to?be?encrypted:?“);
?scanf(“%s“szSource);
?printf(“\nEnter?the?name?of?the?output?file:?“);
?scanf(“%s“szDestination);
?printf(“\nEnter?the?password:“);
?scanf(“%s“szPassword);
?if(EncryptFile(szSource?szDestination?szPassword))
?{
?printf(“\nEncryption?of?the?file?%s?was?a?success.?\n“?szSource);
?printf(“\nThe?encrypted?data?is?in?file?%s.\n“szDestination);
?}else{
HandleError(“\nError?encrypting?file!“);?
?}?
?case?2:
?//--------------------------------------------------------------------
?//?Call?Decryptfile?to?do?the?actual?decryption.?解密文件
?printf(“\n------------------------------------------------------------\n“);
?printf(“\n\n2.Decrypt?a?file.?\n\n“);
?printf(“\nEnter?the?name?of?the?file?to?be?decrypted:?“);
?scanf(“%s“szSource);
?printf(“\nEnter?the?name?of?the?output?file:?“);
?scanf(“%s“szDestination);
?printf(“\nEnter?the?password:“);
?scanf(“%s“szPassword);
?if(DecryptFile(szSource?szDestination?szPassword))
?{
?printf(“\nDecryption?of?the?file?%s?was?a?success.?\n“?szSource);
?printf(“\nThe?decrypted?data?is?in?file?%s.\n“szDestination);
?}else{
HandleError(“\nError?decrypting?file!“);?
?}
?case?3:
?//--------------------------------------------------------------------
?//?Call?S

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????30380??2017-12-17?20:47??CryptoAPI\CryptoAPI.cpp

?????文件???????3437??2017-12-04?08:17??CryptoAPI\CryptoAPI.dsp

?????文件????????526??2017-12-04?09:11??CryptoAPI\CryptoAPI.dsw

?????文件??????41984??2017-12-04?09:11??CryptoAPI\CryptoAPI.ncb

?????文件??????48640??2017-12-04?09:11??CryptoAPI\CryptoAPI.opt

?????文件???????1345??2017-12-04?09:08??CryptoAPI\CryptoAPI.plg

?????文件???24072192??2017-12-18?10:00??CryptoAPI\CryptoAPI.sdf

?????文件???????3584??2017-12-18?10:00??CryptoAPI\CryptoAPI.suo

?????文件???????6138??2017-12-18?08:03??CryptoAPI\CryptoAPI.vcxproj

?????文件????????143??2017-12-04?09:16??CryptoAPI\CryptoAPI.vcxproj.user

?????文件???????1226??2017-12-17?19:06??CryptoAPI\De.txt

?????文件????????788??2017-12-17?20:50??CryptoAPI\Debug\cl.command.1.tlog

?????文件??????13524??2017-12-17?20:50??CryptoAPI\Debug\CL.read.1.tlog

?????文件????????476??2017-12-17?20:50??CryptoAPI\Debug\CL.write.1.tlog

?????文件?????474624??2017-12-18?08:17??CryptoAPI\Debug\CryptoAPI.exe

?????文件????????406??2017-12-11?07:59??CryptoAPI\Debug\CryptoAPI.exe.embed.manifest

?????文件????????472??2017-12-11?07:59??CryptoAPI\Debug\CryptoAPI.exe.embed.manifest.res

?????文件????????381??2017-12-18?08:17??CryptoAPI\Debug\CryptoAPI.exe.intermediate.manifest

?????文件????1056180??2017-12-18?08:17??CryptoAPI\Debug\CryptoAPI.ilk

?????文件????????100??2017-12-18?08:17??CryptoAPI\Debug\CryptoAPI.lastbuildstate

?????文件???????2107??2017-12-18?08:17??CryptoAPI\Debug\CryptoAPI.log

?????文件??????60891??2017-12-17?20:50??CryptoAPI\Debug\CryptoAPI.obj

?????文件????1895424??2017-12-18?08:17??CryptoAPI\Debug\CryptoAPI.pdb

?????文件????????713??2017-12-11?07:59??CryptoAPI\Debug\CryptoAPI.vcxprojResolveAssemblyReference.cache

?????文件??????????0??2017-12-11?07:59??CryptoAPI\Debug\CryptoAPI.write.1.tlog

?????文件????????214??2017-12-11?07:59??CryptoAPI\Debug\CryptoAPI_manifest.rc

?????文件??????????0??2017-12-18?08:51??CryptoAPI\Debug\En.txt

?????文件??????????2??2017-12-18?08:17??CryptoAPI\Debug\link-cvtres.read.1.tlog

?????文件??????????2??2017-12-18?08:17??CryptoAPI\Debug\link-cvtres.write.1.tlog

?????文件??????????2??2017-12-18?08:17??CryptoAPI\Debug\link.10812-cvtres.read.1.tlog

............此處省略61個文件信息

評論

共有 條評論