aboutsummaryrefslogtreecommitdiffstats
path: root/librecrypt_create_context.3
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-05-21 17:12:20 +0200
committerMattias Andrée <m@maandree.se>2026-05-21 17:12:20 +0200
commitb29f4153e83623f24bebe99976e1368ef31bb008 (patch)
tree65473709df1194a2f9277dc5fb47add5e41430c0 /librecrypt_create_context.3
parentAdd (so far untested and undocument) support for pepper (diff)
downloadlibrecrypt-b29f4153e83623f24bebe99976e1368ef31bb008.tar.gz
librecrypt-b29f4153e83623f24bebe99976e1368ef31bb008.tar.bz2
librecrypt-b29f4153e83623f24bebe99976e1368ef31bb008.tar.xz
Add support for custom hash functions
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--librecrypt_create_context.376
1 files changed, 76 insertions, 0 deletions
diff --git a/librecrypt_create_context.3 b/librecrypt_create_context.3
new file mode 100644
index 0000000..cbff3ae
--- /dev/null
+++ b/librecrypt_create_context.3
@@ -0,0 +1,76 @@
+.TH LIBRECRYPT_CREATE_CONTEXT 3 LIBRECRYPT
+.SH NAME
+librecrypt_create_context - Create a library configuration object
+
+.SH SYNOPSIS
+.nf
+#include <librecrypt.h>
+
+typedef struct librecrypt_context LIBRECRYPT_CONTEXT;
+
+LIBRECRYPT_CONTEXT *\fBlibrecrypt_create_context\fP(void);
+.fi
+.PP
+Link with
+.IR -lrecrypt .
+
+.SH DESCRIPTION
+The
+.BR librecrypt_create_context ()
+function allocates, and initialises, a new
+library configuration object of the opaque type
+.IR LIBRECRYPT_CONTEXT ,
+which is also an incomplete type in the header file,
+as it's size and layout may differ depending on
+version and implementation of the library.
+
+.SH RETURN VALUES
+The
+.BR librecrypt_create_context ()
+function returns a new pointer upon successful
+completion, when no longer needed, it should be
+deallocated using the
+.BR librecrypt_free_context (3)
+function. On failure
+.I NULL
+is returned and
+.I errno
+is set to describe the error.
+
+.SH ERRORS
+The
+.BR librecrypt_create_context ()
+function will fail if:
+.TP
+.B ENOMEM
+Failed to allocate enough memory.
+
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.PP
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR librecrypt_create_context ()
+T} Thread safety MT-Safe
+T{
+.BR librecrypt_create_context()
+T} Async-signal safety AS-Unsafe
+.TE
+.sp
+
+.SH HISTORY
+The
+.BR librecrypt_create_context ()
+function was introduced in version 1.1 of
+.BR librecrypt .
+
+.SH SEE ALSO
+.BR librecrypt (7),
+.BR librecrypt_free_context (3),
+.BR librecrypt_set_pepper (3),
+.BR librecrypt_set_custom_algorithms (3)