Dear openssl people,
In one of my classes methods I do
something similar to this. I got it off the openssl site. When EVP_EncryptInit
is called, it blows away all my memory. My this pointer is invalid and all the
local data becomes garbage. I was wondering if there was anything I needed to
do? Or if anyone knows why this would happen. BTW EVP_EncryptInit returns 1 but
I don't know what that code means, I didn't see it in the docs.
Thanks.
unsigned char outbuf[1024];
int outlen,
tmplen;
unsigned char key[] =
{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
unsigned char iv[] =
{1,2,3,4,5,6,7,8};
char intext[] = "ABCD";
EVP_CIPHER_CTX
ctx;
EVP_EncryptInit(&ctx, EVP_bf_cbc(), key,
iv);
-------------------------------------
Andrew T.
Finnell
Software Engineer
eSecurity Inc
(321)
394-2485