Home GnuPG

core: Add Base-64 encoder.

Description

core: Add Base-64 encoder.

* src/b64enc.c: Change to fit into libgpg-error.
* src/Makefile.am: Add b64enc.c
* src/b64dec.c: Use xtrymalloc etc.  Always use gpg_err_code_t.
(_gpgrt_b64dec_start): Set decoder flag
(_gpgrt_b64dec_finish): Check for conflict.
(_gpgrt_b64state): Move to ...
* src/gpgrt-int.h: here.  Add new fields.
* src/visibility.c (gpgrt_b64enc_start): New.
(gpgrt_b64enc_write): New.
(gpgrt_b64enc_finish): New.
* src/gpg-error.vers, src/gpg-error.def.in: Add new functions.
* src/gpg-error.h.in: Ditto.
* src/visibility.h: Ditto.
* tests/t-b64dec.c: Remove.
* tests/t-b64.c: New.
* tests/Makefile.am (TESTS): Replace t-b64dec by t-b64.
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Mar 22 2018, 5:20 PM
Parents
rEb3df10d66208: core: Add file b64enc.c from gnupg
Branches
Unknown
Tags
Unknown