diff options
author | Mattias Andrée <maandree@kth.se> | 2022-02-12 16:16:47 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-02-12 16:16:56 +0100 |
commit | 3aa9f7176fcb50386967e89653272af7fb7cf3c5 (patch) | |
tree | 7bade092a2e263bda67634d03f579578c2c53101 /libar2_erase.3 | |
parent | Make libar2_latest_argon2_version const (diff) | |
download | libar2-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.3 | 51 |
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) |