45 EVP_EncryptInit_ex(
m_ctxAES2, EVP_aes_128_ctr(), NULL, key,
m_iv2);
46 memcpy(
key1, key, 16);
47 memcpy(
key2, key, 16);
65 memcpy(
key1, key, 16);
90 EVP_DecryptUpdate(
m_ctxAES1, tmpBuff, (
int*)&i, in,
len);
96 memcpy(out, tmpBuff,
len);
112 EVP_EncryptUpdate(
m_ctxAES2, tmpBuff, (
int*)&i, in,
len);
113 memcpy(out, tmpBuff,
len);
SINT32 crypt2(const UINT8 *in, UINT8 *out, UINT32 len)
Decryptes in to out using iv2 and key2.
SINT32 setKeys(const UINT8 *key, UINT32 keysize)
Sets the keys for crypt1() and crypt2() either to the same key (if keysize==KEY_SIZE) or to different...
SINT32 crypt1(const UINT8 *in, UINT8 *out, UINT32 len)
Encryptes/Decrpytes in to out using iv1 and key1.
EVP_CIPHER_CTX * m_ctxAES2
SINT32 setKey(const UINT8 *key)
Sets the keys for crypt1() and crypt2() to the same key.
EVP_CIPHER_CTX * m_ctxAES1