aboutsummaryrefslogtreecommitdiffstats
path: root/libblake_blake256_digest_get_required_input_size.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-02-19 10:54:34 +0100
committerMattias Andrée <maandree@kth.se>2022-02-19 10:54:34 +0100
commitffc17816a5b82eef5c136f409df3313742b25ff9 (patch)
tree26941b0271578e9cf15b7bb27e021b178ae2ec1f /libblake_blake256_digest_get_required_input_size.c
parentAdd some documentation, add const, and make some functions inline (diff)
downloadlibblake-ffc17816a5b82eef5c136f409df3313742b25ff9.tar.gz
libblake-ffc17816a5b82eef5c136f409df3313742b25ff9.tar.bz2
libblake-ffc17816a5b82eef5c136f409df3313742b25ff9.tar.xz
Add document BLAKE functions and make two functions inline
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libblake_blake256_digest_get_required_input_size.c')
-rw-r--r--libblake_blake256_digest_get_required_input_size.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/libblake_blake256_digest_get_required_input_size.c b/libblake_blake256_digest_get_required_input_size.c
index f354c76..bc776ff 100644
--- a/libblake_blake256_digest_get_required_input_size.c
+++ b/libblake_blake256_digest_get_required_input_size.c
@@ -1,14 +1,4 @@
/* See LICENSE file for copyright and license details. */
#include "common.h"
-size_t
-libblake_blake256_digest_get_required_input_size(size_t len, size_t bits, const char *suffix)
-{
- bits += suffix ? strlen(suffix) : 0;
- len += bits >> 3;
- bits &= 7;
- bits += (len & 63) << 3;
- len &= ~(size_t)63;
- len += (size_t)64 << (bits >= 512 - (1 + 2 * 32));
- return len;
-}
+extern inline size_t libblake_blake256_digest_get_required_input_size(size_t len, size_t bits, const char *suffix);