0
回答
error:04068084:lib(4):func(104):reason(132) 对应的错误怎么找说明
终于搞明白,存储TCO原来是这样算的>>>   

unsigned char InBuff[64], OutBuff[64]; 
ZeroMemory(InBuff,64);
ZeroMemory(OutBuff,64);

srand((int)GetTickCount());

for (int i = 0; i < 64; i++) 
{
InBuff[i] = rand()%254+1;
}


// ----------
// 5. 利用随机32字节Seed来产生256位的AES密钥对
unsigned char Seed[32];// 可以采用Rand()等方法来构造随机信息
memcpy(Seed,InBuff,32);
//memset(Seed,8,32);
AES_set_encrypt_key(Seed, 256, &(pUserInfo->AESEncryptKey));
AES_set_decrypt_key(Seed, 256, &(pUserInfo->AESDecryptKey));


int n = RSA_public_encrypt(64, (const unsigned char*)InBuff, OutBuff, EncryptRsa, RSA_NO_PADDING); // 加密


if (n < 0)
{

char * pstr =  ERR_error_string(ERR_get_error(),NULL);

}

举报
OSChinaKong...
发帖于3年前 0回/232阅
顶部