From: Niels Möller Date: Fri, 25 Apr 2014 19:20:16 +0000 (+0200) Subject: Document that length arguments refer to the destination size. X-Git-Tag: nettle_3.0_release_20140607~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=268bc83da346ec3424926b4615b9d73dee6c1508;p=thirdparty%2Fnettle.git Document that length arguments refer to the destination size. --- diff --git a/nettle.texinfo b/nettle.texinfo index bbc1a9da..1cb15096 100644 --- a/nettle.texinfo +++ b/nettle.texinfo @@ -295,9 +295,12 @@ In all functions, strings are represented with an explicit length, of type @code{size_t}, and a pointer of type @code{uint8_t *} or @code{const uint8_t *}. For functions that transform one string to another, the argument order is length, destination pointer and source -pointer. Source and destination areas are of the same length. Source and -destination may be the same, so that you can process strings in place, -but they @emph{must not} overlap in any other way. +pointer. Source and destination areas are usually of the same length. +When they differ, e.g., for @code{ccm_encrypt_message}, the length +argument specifies the size of the destination area. Source and +destination pointers may be equal, so that you can process strings in +place, but source and destination areas @emph{must not} overlap in any +other way. Many of the functions lack return value and can never fail. Those functions which can fail, return one on success and zero on failure. @@ -547,7 +550,7 @@ identifiers for other purposes. So avoid doing that. @defvr Constant SHA512_224_DIGEST_SIZE @defvrx Constant SHA512_256_DIGEST_SIZE @defvrx Constant SHA384_DIGEST_SIZE -The digest sizes for each variant, i.e., 28, 32, and 48, respectively. +The digest size for each variant, i.e., 28, 32, and 48, respectively. @end defvr @defvr Constant SHA512_224_DATA_SIZE