aboutsummaryrefslogtreecommitdiffstats
path: root/libar2_erase.3
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-02-12 16:16:47 +0100
committerMattias Andrée <maandree@kth.se>2022-02-12 16:16:56 +0100
commit3aa9f7176fcb50386967e89653272af7fb7cf3c5 (patch)
tree7bade092a2e263bda67634d03f579578c2c53101 /libar2_erase.3
parentMake libar2_latest_argon2_version const (diff)
downloadlibar2-3aa9f7176fcb50386967e89653272af7fb7cf3c5.tar.gz
libar2-3aa9f7176fcb50386967e89653272af7fb7cf3c5.tar.bz2
libar2-3aa9f7176fcb50386967e89653272af7fb7cf3c5.tar.xz
Add man pages, readme, and nonnull attributes and fix documentation typos
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--libar2_erase.351
1 files changed, 51 insertions, 0 deletions
diff --git a/libar2_erase.3 b/libar2_erase.3
new file mode 100644
index 0000000..53ca375
--- /dev/null
+++ b/libar2_erase.3
@@ -0,0 +1,51 @@
+.TH LIBAR2_ERASE 7 LIBAR2
+.SH NAME
+libar2_erase - Securily erase memory
+
+.SH SYNOPSIS
+.nf
+#include <libar2.h>
+
+void libar2_erase(volatile void *\fImem\fP, size_t \fIsize\fP);
+.fi
+.PP
+Link with
+.IR -lar2 .
+
+.SH DESCRIPTION
+The
+.BR libar2_erase ()
+function writes the number of bytes
+specified in the
+.I size
+parameter to the buffer specified in the
+.I mem
+parameter. Unlike functions like
+.BR bzero (3)
+and
+.BR memset (3),
+the compiler should not be able to optimise
+away a call to the
+.BR libar2_erase ()
+function, even if link-time optimisation
+is enabled, and is thus recommended for
+wiping passwords from memory after they
+have been hashed.
+.PP
+.I mem
+may only be
+.I NULL
+if
+.I size
+is 0.
+
+.SH RETURN VALUES
+None.
+
+.SH ERRORS
+The
+.BR libar2_erase ()
+function cannot fail.
+
+.SH SEE ALSO
+.BR libar2 (7)