diff options
author | Mattias Andrée <maandree@kth.se> | 2022-02-13 23:22:53 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-02-13 23:22:53 +0100 |
commit | 238d8b72069b80522066ac5edc3a4d2155e3382c (patch) | |
tree | 3ba436e8c5cc967d4e26f5a1bd454d92697b5eb2 /libar2_hash_buf_size.3 | |
parent | Bug fix (diff) | |
download | libar2-238d8b72069b80522066ac5edc3a4d2155e3382c.tar.gz libar2-238d8b72069b80522066ac5edc3a4d2155e3382c.tar.bz2 libar2-238d8b72069b80522066ac5edc3a4d2155e3382c.tar.xz |
Add libar2_hash_buf_size and fix related documentation for libar2_hash
Diffstat (limited to '')
-rw-r--r-- | libar2_hash_buf_size.3 | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/libar2_hash_buf_size.3 b/libar2_hash_buf_size.3 new file mode 100644 index 0000000..f538cfc --- /dev/null +++ b/libar2_hash_buf_size.3 @@ -0,0 +1,45 @@ +.TH LIBAR2_HASH_BUF_SIZE 7 LIBAR2 +.SH NAME +libar2_hash_buf_size - Determine require output buffer size + +.SH SYNOPSIS +.nf +#include <libar2.h> + +size_t libar2_hash_buf_size(struct libar2_argon2_parameters *\fIparams\fP); +.fi +.PP +Link with +.IR -lar2 . + +.SH DESCRIPTION +The +.BR libar2_hash_buf_size () +function returns the number of bytes that the +output buffer for the +.BR libar2_hash (3) +function must fit (that it, it's first parameter). +.PP +.I params +may not be +.IR NULL . +.PP +The return value is +.I params->hashlen +if this number is 64 or less, otherwise it is +.I params->hashlen +rounded up to the next multiple of 128. + +.SH RETURN VALUES +See +.BR DESCRIPTION . + +.SH ERRORS +The +.BR libar2_hash_buf_size () +function cannot fail; however, if the +return value is 0, the value has overflown. + +.SH SEE ALSO +.BR libar2 (7), +.BR libar2_hash (3) |