This works for me:
void base64Decode(unsigned char* pIn, int inLen, unsigned char* pOut,
int& outLen)
{
// create a memory buffer containing base64 encoded data
BIO* bmem = BIO_new_mem_buf((void*)pIn, inLen);
// push a Base64 filter so that reading from buffer decodes it
On Thu, Sep 3, 2009 at 6:36 PM, Dave
Thompson wrote:
>> From: owner-openssl-us...@openssl.org On Behalf Of Hazel John
>> Sent: Thursday, 03 September, 2009 15:25
>
>> openssl enc -aes-256-cbc -K
>> 000102030405060708090A0B0C0D0E0F1011121314151
len, &key, pIV, AES_DECRYPT);
cout << "decrypted output is: ";
for (unsigned int i = 0; i < 128; ++i)
{
cout << hex << showbase << pIn[i];
}
cout << endl;
cout << "done testing&quo
I am specifying the key and IV and using the same hex based string for both.
On Thu, Sep 3, 2009 at 2:02 PM, Victor
Duchovni wrote:
> On Thu, Sep 03, 2009 at 01:51:10PM -0500, Hazel John wrote:
>
>> Hi,
>> I need to encrypt simple strings to readable strings using the opens
Hi,
I need to encrypt simple strings to readable strings using the openssl
command line (opessl enc with the -a option to return readable
strings) and decrypt this in my code (c++/linux). I tried both the low
level aes and evp functions and couldn't get the results to match. Is
there a default padd