
請求大神幫忙,在解密的時候中斷
int lenct = (int)strlen((const char*)CB->CT.ctext);
EVP_CIPHER_CTX ctx1;
unsigned char gkAfterDecrypt[512];
int txtLenAfterDecrypt;
OpenSSL_add_all_ciphers();
int tmp;
// int outl = CB->CT.ctextlen;
//EVP_CIPHER_CTX ctx1;
const EVP_CIPHER *type1;
type1 = EVP_aes_128_ecb();
EVP_DecryptInit(&ctx1, type1, pl2, iv1);
EVP_DecryptUpdate(&ctx1,//解密背景關系物件
gkAfterDecrypt, //解密后的內容
&txtLenAfterDecrypt,//解密后的內容長度
CB->CT.ctext, //要解密的內容
64 //要解密的內容長度
);
tmp = txtLenAfterDecrypt;
//結束解密
EVP_DecryptFinal(&ctx1, gkAfterDecrypt + txtLenAfterDecrypt, &txtLenAfterDecrypt);
txtLenAfterDecrypt += tmp;
EVP_CIPHER_CTX_cleanup(&ctx1);
gkAfterDecrypt[txtLenAfterDecrypt] = 0;
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/60143.html
標籤:網絡及通訊開發
上一篇:我想問一下我的代碼哪里出錯啦?注冊哪里一直可以同一個用戶名注冊
下一篇:c++
