using Callback Based Data Buffers with Java
wk at gnupg.org
Tue Jul 16 07:44:22 CEST 2013
On Tue, 16 Jul 2013 03:19, hans at guardianproject.info said:
> Ok, that makes sense. So I have to figure out the proper way here. I'm using
> gpgme_data_new_from_stream() in gpgmeDataNewFromFilename():
Which is merly a wrapper around stdio streams (fopen,fread,fwrite,fclose).
> Then in gpgmeDataRelease(), I believe I'm responsible for closing that stream.
> So I need to maintain the FILE *stream outside of gpgme_data_t? I looked
> around a lot for examples of code that uses gpgme_data_new_from_stream() and
> gpgme_data_new_from_cbs() but didn't find any. I'd love some pointers for that.
An example for the latter is gpgme/tests/gpg/t-encrypt-large.c .
More complex examples are in gpgol. For example gpgol/src/pgpmime.c or
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
More information about the Gnupg-devel