Title: ??: Please Help: Crypto library with Visual C++
HI :D
Sorry to bother you again.
I
think I have found the reason :)
it is
because the Project setting is incorrect (thanks for your hints
indeed)
I have
to set the Code Generation (under tag C/C++), the "Use run-time library" to
"Multithreaded DLL" :D
All
the best.
Best
regards,Jordan Cheun Ngen,
ChongINF-4067 Universiteit TwentePostbus 2177500 AE EnschedeThe
NetherlandsDistributed and Embedded Systems
(DIES)Office Phone: +31 53
4894655Web site: http://www.cs.utwente.nl/~chongEmail Add.:
[EMAIL PROTECTED]
-Original Message-From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of ??Sent: Monday, September 10, 2001 1:48
PMTo: '[EMAIL PROTECTED]'Subject: ??: Please
Help: BIO!!
oh when application crash .. it normally beacause link mfc lib
problem
you may try use mfc in shared dll or mfc instatic
dll
it may ok..
as for memory leak ..
begin ..
OpenSSL_add_all_algorithms();SSL_load_error_strings();
your code...
End:
ERR_free_strings();EVP_cleanup();
see u later...:)
-原始邮件-发件人: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]代表 Jordan C N
Chong发送时间: 2001年9月10日 19:43收件人:
[EMAIL PROTECTED]主题: RE: Please Help:
BIO!!
Hi,
Thanks for your reply. I have tried, still the
memory leak problem happens :)
and the whole application
crashes
my
code is like this:
BIO *bio, *b64;BIO
*bio_out;char inbuf[128];int
inlen;b64 = BIO_new(BIO_f_base64());bio
= BIO_new_file("content.key", "rb"); bio_out = BIO_new_fp(stdout,
BIO_NOCLOSE);bio = BIO_push(b64, bio);while
((inlen = BIO_read(bio, inbuf, 128)) 0)
{BIO_write(bio_out, inbuf,
inlen);}
BIO_free_all(bio);
what I wish to do is, read the data from the file
content.key
and then decode the data
and then convert the decoded data in to a char *
(or perhaps to another new file)
but here what i do is just print out the decoded
data :)
i
am sorry to bother you that much.
pls forgive
and pls help if you have the time
:D
thousand thanks. Wish you all the
best.
Best
regards,Jordan Cheun
Ngen, ChongINF-4067 Universiteit TwentePostbus 2177500 AE
EnschedeThe NetherlandsDistributed and Embedded Systems
(DIES)Office Phone: +31
53 4894655Web site: http://www.cs.utwente.nl/~chongEmail Add.:
[EMAIL PROTECTED]
-Original Message-From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
??Sent: Monday, September 10, 2001 1:24 PMTo:
'[EMAIL PROTECTED]'Subject: ??: Please Help: Crypto
library with Visual C++
oh
nothing do not be nervous
i
think if you want to read data from a file
first you must construct a
BIO * mbio =
BIO_new_file(filename , "rb") object
then build another BIO* b64
=BIO_new(BIO_f_base64());
then mbio =
BIO_push(b64, mbio);
all ok
...
read data from
while((inlen =
BIO_read(mbio, inbuf, strlen(message))) 0)
{
do as you
wish
}// remember free all bio resource BIO_free_all(bio);
can this solve your problem?