From 61eecfc1fe903b0a9eaaf4453b1dbcc26b6fbb62 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 6 Oct 2015 15:20:33 +0200 Subject: m doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libkeccak/files.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/libkeccak/files.h b/src/libkeccak/files.h index 5a0b159..ebe0a81 100644 --- a/src/libkeccak/files.h +++ b/src/libkeccak/files.h @@ -33,7 +33,7 @@ * @param spec Specifications for the hashing algorithm * @param suffix The data suffix, see `libkeccak_digest` * @param hashsum Output array for the hashsum, have an allocation size of - * at least `(spec->output / 8) * sizeof(char)`, may be `NULL` + * at least `((spec->output + 7) / 8) * sizeof(char)`, may be `NULL` * @return Zero on success, -1 on error */ LIBKECCAK_GCC_ONLY(__attribute__((nonnull(2, 3)))) @@ -50,7 +50,7 @@ int libkeccak_generalised_sum_fd(int fd, libkeccak_state_t* restrict state, * @param state The hashing state, should not be initialised (memory leak otherwise) * @param spec Specifications for the hashing algorithm * @param hashsum Output array for the hashsum, have an allocation size of - * at least `(spec->output / 8) * sizeof(char)`, may be `NULL` + * at least `((spec->output + 7) / 8) * sizeof(char)`, may be `NULL` * @return Zero on success, -1 on error */ LIBKECCAK_GCC_ONLY(__attribute__((nonnull(2, 3), artificial, gnu_inline))) @@ -70,7 +70,7 @@ int libkeccak_keccaksum_fd(int fd, libkeccak_state_t* restrict state, * @param state The hashing state, should not be initialised (memory leak otherwise) * @param output The output size parameter for the hashing algorithm * @param hashsum Output array for the hashsum, have an allocation size of - * at least `(output / 8) * sizeof(char)`, may be `NULL` + * at least `((output + 7) / 8) * sizeof(char)`, may be `NULL` * @return Zero on success, -1 on error */ LIBKECCAK_GCC_ONLY(__attribute__((nonnull(2), artificial, gnu_inline))) @@ -93,7 +93,7 @@ int libkeccak_sha3sum_fd(int fd, libkeccak_state_t* restrict state, * @param semicapacity The semicapacity parameter for the hashing algorithm * @param output The output size parameter for the hashing algorithm * @param hashsum Output array for the hashsum, have an allocation size of - * at least `(output / 8) * sizeof(char)`, may be `NULL` + * at least `((output + 7) / 8) * sizeof(char)`, may be `NULL` * @return Zero on success, -1 on error */ LIBKECCAK_GCC_ONLY(__attribute__((nonnull(2), artificial, gnu_inline))) @@ -116,7 +116,7 @@ int libkeccak_rawshakesum_fd(int fd, libkeccak_state_t* restrict state, * @param semicapacity The semicapacity parameter for the hashing algorithm * @param output The output size parameter for the hashing algorithm * @param hashsum Output array for the hashsum, have an allocation size of - * at least `(output / 8) * sizeof(char)`, may be `NULL` + * at least `((output + 7) / 8) * sizeof(char)`, may be `NULL` * @return Zero on success, -1 on error */ LIBKECCAK_GCC_ONLY(__attribute__((nonnull(2), artificial, gnu_inline))) -- cgit v1.2.3-70-g09d2