blob: d6cf49e0a9aeddbd392cfe31ef75dd2edd049a8c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
.TH LIBAR2_HASH_BUF_SIZE 3 LIBAR2
.SH NAME
libar2_hash_buf_size - Determine require output buffer size
.SH SYNOPSIS
.nf
#include <libar2.h>
size_t libar2_hash_buf_size(const 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 the
it will be larger than
.I params->hashlen
but no larger than
.IR "(params->hashlen + 63)" .
.SH RETURN VALUES
The
.BR libar2_hash_buf_size ()
function returns the number of bytes that the
output buffer size for the
.BR libar2_hash (3)
function upon successful completion. On failure
0 is returned and
.I errno
is set to describe the error.
.SH ERRORS
The
.BR libar2_hash_buf_size ()
function will fail if:
.TP
.B EOVERFLOW
The resulting value is too large to fit
in the return type.
.SH SEE ALSO
.BR libar2 (7),
.BR libar2_hash (3)
|