aboutsummaryrefslogtreecommitdiffstats
path: root/libar2simplified_encode.3
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-02-15 11:49:20 +0100
committerMattias Andrée <maandree@kth.se>2022-02-15 11:49:20 +0100
commitbf71e9977f0f25c5a4eb4142355e255e08fde8a1 (patch)
treed1088dae8080803cb98a9fb27b03b7e6249f32c8 /libar2simplified_encode.3
parentRewait if sem_wait is interrupted (pthread_mutex_lock cannot be interrupted) (diff)
downloadlibar2simplified-bf71e9977f0f25c5a4eb4142355e255e08fde8a1.tar.gz
libar2simplified-bf71e9977f0f25c5a4eb4142355e255e08fde8a1.tar.bz2
libar2simplified-bf71e9977f0f25c5a4eb4142355e255e08fde8a1.tar.xz
Add readme and man pages
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libar2simplified_encode.3')
-rw-r--r--libar2simplified_encode.389
1 files changed, 89 insertions, 0 deletions
diff --git a/libar2simplified_encode.3 b/libar2simplified_encode.3
new file mode 100644
index 0000000..1329e28
--- /dev/null
+++ b/libar2simplified_encode.3
@@ -0,0 +1,89 @@
+.TH LIBAR2SIMPLIFIED_ENCODE 3 LIBAR2SIMPLIFIED
+.SH NAME
+libar2simplified_encode - Encode hashing parameters, with or without hashing result
+
+.SH SYNOPSIS
+.nf
+#include <libar2simplified.h>
+
+char *libar2simplified_encode(const struct libar2_argon2_parameters *\fIparams\fP, void *\fIhash\fP);
+.fi
+.PP
+Link with
+.IR "-lar2simplified -lar2" .
+
+.SH DESCRIPTION
+The
+.BR libar2simplified_encode ()
+function encode hashing parameters provided via the
+.I params
+parameter, with or without the tag (hashing result)
+provided in the
+.I hash
+parameter.
+.PP
+This function extends the standard format for Argon2
+by letting the exact salt or tag (hash) be unspecified,
+but the length specified using an asterisk-prefixed,
+decimal integer. See
+.BR libar2_encode_params (3)
+for details about the standard format. To set the salt
+to unspecified, set
+.I params->salt
+to
+.IR NULL .
+To set the tag to unspecified, set
+.I hash
+to
+.IR NULL .
+See
+.BR libar2_hash (3)
+for details about
+.IR params .
+.PP
+The secret (pepper) and associated data, which may be
+set in
+.I params
+will not be included in the returned string.
+.PP
+.I params
+may not be
+.IR NULL .
+
+.SH RETURN VALUES
+The
+.BR libar2simplified_encode ()
+function returns a dynamically allocated string
+detailing the contents of
+.I params
+and
+.IR hash ,
+which can be deallocated using the
+.BR free (3)
+function, upon successful completion. On error,
+.I NULL
+is returned and
+.I errno
+is set to describe the error.
+
+.SH ERRORS
+The
+.BR libar2simplified_encode ()
+function will fail if:
+.TP
+.B EINVAL
+The contents of
+.I params
+is invalid or unsupported.
+.TP
+.B ENOMEM
+Insufficient storage space is available.
+
+.SH SEE ALSO
+.BR libar2simplified (7),
+.BR libar2simplified_encode_hash (3),
+.BR libar2simplified_decode (3),
+.BR libar2simplified_hash (3),
+.BR libar2_encode_params (3),
+.BR libar2_validate_params (3),
+.BR libar2_hash (3)