diff options
author | Werner Koch <wk@gnupg.org> | 2018-03-22 17:20:52 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2018-03-22 17:38:24 +0100 |
commit | ffc8f805165a13d16ed227051c59d732117ec9d4 (patch) | |
tree | 61c75b91c4da65929381313489c7e00715015cea /src/visibility.h | |
parent | b3df10d6620894bc4047af1e14239b258e440803 (diff) | |
download | libgpg-error-ffc8f805165a13d16ed227051c59d732117ec9d4.tar.gz |
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>
Diffstat (limited to 'src/visibility.h')
-rw-r--r-- | src/visibility.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/visibility.h b/src/visibility.h index eae0f81..cfa32e5 100644 --- a/src/visibility.h +++ b/src/visibility.h @@ -161,6 +161,9 @@ MARK_VISIBLE (gpgrt_getcwd) MARK_VISIBLE (gpgrt_b64dec_start) MARK_VISIBLE (gpgrt_b64dec_proc) MARK_VISIBLE (gpgrt_b64dec_finish) +MARK_VISIBLE (gpgrt_b64enc_start) +MARK_VISIBLE (gpgrt_b64enc_write) +MARK_VISIBLE (gpgrt_b64enc_finish) MARK_VISIBLE (gpgrt_get_errorcount) MARK_VISIBLE (gpgrt_inc_errorcount) @@ -327,6 +330,9 @@ MARK_VISIBLE (gpgrt_set_usage_outfnc); #define gpgrt_get_syscall_clamp _gpgrt_USE_UNDERSCORED_FUNCTION #define gpgrt_set_alloc_func _gpgrt_USE_UNDERSCORED_FUNCTION +#define gpgrt_b64enc_start _gpgrt_USE_UNDERSCORED_FUNCTION +#define gpgrt_b64enc_write _gpgrt_USE_UNDERSCORED_FUNCTION +#define gpgrt_b64enc_finish _gpgrt_USE_UNDERSCORED_FUNCTION #define gpgrt_b64dec_start _gpgrt_USE_UNDERSCORED_FUNCTION #define gpgrt_b64dec_proc _gpgrt_USE_UNDERSCORED_FUNCTION #define gpgrt_b64dec_finish _gpgrt_USE_UNDERSCORED_FUNCTION |