From 6176161120be779b546a98701ed3fb6a5ee03263 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niels=20M=C3=B6ller?= Date: Fri, 7 Feb 2014 09:23:23 +0100 Subject: [PATCH] Updated base16_encode_update and base64_encode_update documentation. --- ChangeLog | 4 ++++ nettle.texinfo | 22 ++++++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 69cd8764..fdc4a0f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2014-02-07 Niels Möller + * nettle.texinfo (ASCII encoding): Document that + base16_encode_update and base64_encode_update now uses dst_length + as an output only. + * testsuite/base64-test.c (test_main): Updated base64_decode_update test case. diff --git a/nettle.texinfo b/nettle.texinfo index 71722a3a..68883a58 100644 --- a/nettle.texinfo +++ b/nettle.texinfo @@ -3700,12 +3700,11 @@ to @code{base64_decode_update}. @end deffn @deftypefun {void} base64_decode_update (struct base64_decode_ctx *@var{ctx}, size_t *@var{dst_length}, uint8_t *@var{dst}, size_t @var{src_length}, const uint8_t *@var{src}) -After @var{ctx} is initialized, this function may be called to decode @var{src_length} -bytes from @var{src}. @var{dst} should point to an area of size at least -BASE64_DECODE_LENGTH(@var{length}), and for sanity checking, @var{dst_length} -should be initialized to the size of that area before the call. -@var{dst_length} is updated to the amount of decoded output. The function will return -1 on success and 0 on error. +After @var{ctx} is initialized, this function may be called to decode +@var{src_length} bytes from @var{src}. @var{dst} should point to an area +of size at least BASE64_DECODE_LENGTH(@var{src_length}). The amount of data +generated is returned in *@var{dst_length}. Returns 1 on success +and 0 on error. @end deftypefun @deftypefun {int} base64_decode_final (struct base64_decode_ctx *@var{ctx}) @@ -3748,12 +3747,11 @@ to @code{base16_decode_update}. @end deffn @deftypefun {int} base16_decode_update (struct base16_decode_ctx *@var{ctx}, size_t *@var{dst_length}, uint8_t *@var{dst}, size_t @var{src_length}, const uint8_t *@var{src}) -After @var{ctx} is initialized, this function may be called to decode @var{src_length} -bytes from @var{src}. @var{dst} should point to an area of size at least -BASE16_DECODE_LENGTH(@var{length}), and for sanity checking, @var{dst_length} -should be initialized to the size of that area before the call. -@var{dst_length} is updated to the amount of decoded output. The function will return -1 on success and 0 on error. +After @var{ctx} is initialized, this function may be called to decode +@var{src_length} bytes from @var{src}. @var{dst} should point to an area +of size at least BASE16_DECODE_LENGTH(@var{src_length}). The amount of data +generated is returned in *@var{dst_length}. Returns 1 on success +and 0 on error. @end deftypefun @deftypefun {int} base16_decode_final (struct base16_decode_ctx *@var{ctx}) -- 2.47.2