-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
bonjour les news
j ecris un petit client smtp et je suis confronter à encoder mes
donnees en base64
j utilise les fonctions standard openssl
ma fonction
https://github.com/fakessh/openprojectssl/blob/master/smtp_openssl.c
char *base64(char *input, int length)
{
BIO *bmem, *b64;
BUF_MEM *bptr;
b64 = BIO_new(BIO_f_base64());
bmem = BIO_new(BIO_s_mem());
b64 = BIO_push(b64, bmem);
BIO_write(b64, input, length);
BIO_flush(b64);
BIO_get_mem_ptr(b64, &bptr);
char *buff = (char *)malloc(bptr->length+1);
memcpy(buff, bptr->data, bptr->length);
buff[bptr->length] = 0;
BIO_free_all(b64);
return buff;
}
malgre toute l attention que j ai mis en oeuvre pour ecrire ma fonction
cela ne fonctionne pas
pouvez vous m aidez
sincerement
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org/
iEYEARECAAYFAk/BSfQACgkQNgqL0sJiZ0JHMACcDhd2JIXhjoA3XOoxrmKh4EKU
ZxoAniTuMQ6N19lgb9dKMc5ug4EgX+2F
=QXqh
-----END PGP SIGNATURE-----