aboutsummaryrefslogtreecommitdiffstats
path: root/libar2_hash_buf_size.3
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-02-14 21:25:06 +0100
committerMattias Andrée <maandree@kth.se>2022-02-14 21:25:06 +0100
commitea7d8f4a919bf6c9e68ea4a55ef763c310ecfc9b (patch)
tree416ad9e2f06aef594714b06a91f7f379d1766749 /libar2_hash_buf_size.3
parentFix previous commit (diff)
downloadlibar2-ea7d8f4a919bf6c9e68ea4a55ef763c310ecfc9b.tar.gz
libar2-ea7d8f4a919bf6c9e68ea4a55ef763c310ecfc9b.tar.bz2
libar2-ea7d8f4a919bf6c9e68ea4a55ef763c310ecfc9b.tar.xz
Refine libar2_hash_buf_size + add test + securely erase parts of the hash output buffer that is written to but is not part of the hash
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libar2_hash_buf_size.3')
-rw-r--r--libar2_hash_buf_size.39
1 files changed, 5 insertions, 4 deletions
diff --git a/libar2_hash_buf_size.3 b/libar2_hash_buf_size.3
index dcb8285..66cd05d 100644
--- a/libar2_hash_buf_size.3
+++ b/libar2_hash_buf_size.3
@@ -6,7 +6,7 @@ libar2_hash_buf_size - Determine require output buffer size
.nf
#include <libar2.h>
-size_t libar2_hash_buf_size(struct libar2_argon2_parameters *\fIparams\fP);
+size_t libar2_hash_buf_size(const struct libar2_argon2_parameters *\fIparams\fP);
.fi
.PP
Link with
@@ -26,10 +26,11 @@ may not be
.PP
The return value is
.I params->hashlen
-if this number is 64 or less, a multiple of 128
-that is around twice as large as
+if this number is 64 or less, otherwise the
+it will be larger than
.I params->hashlen
-(can be a bit more).
+but no larger than
+.IR "(params->hashlen + 63)" .
.SH RETURN VALUES
The