One other issue though the base64 encoded string contains new line
character at the end.
is there a way through the api to not include it.
It is characteristic of openssl to insert linebreaks in both base64
and PEM encodings --- and to require them when it decodes data. If
for some r
One other issue though the base64 encoded string contains new line character
at the end.
is there a way through the api to not include it.
From: "k b" <[EMAIL PROTECTED]>
Reply-To: openssl-users@openssl.org
To: openssl-users@openssl.org
Subject: Re: Base64 encoding with BIO_
that was indeed the problem, a read only buffer. Thanks Jim !
From: Jim Fox <[EMAIL PROTECTED]>
Reply-To: openssl-users@openssl.org
To: openssl-users@openssl.org
Subject: Re: Base64 encoding with BIO_new_mem_buf
Date: Thu, 12 Jul 2007 11:21:28 -0700 (PDT)
And yeah even with the c
And yeah even with the correct size it still doesn't work.
The BIO_new_mem_buf creates a read-only buffer.
If you want to write to memory use
bio = BIO_new(BIO_s_mem());
and use BIO_get_mem_ptr to get a pointer to the buffer.
Jim
);
printf("[%s]\n", enc);
}
And yeah even with the correct size it still doesn't work.
here's the output i get from all the printfs
$./a.out
Bytes Written 4, (null)
[]
$
From: Jim Fox <[EMAIL PROTECTED]>
Reply-To: openssl-users@openssl.org
To: openssl-users@opens
But what i really want is the encoded string in a char buffer.
And so i comment out 2 and use 1 instead. As its suppose to write
the encoded string into a buffer,
but the problem here is pEncBuf is empty even though bytesWritten says it
wrote 4 bytes.
And i can't explain why it won'