aboutsummaryrefslogtreecommitdiffstats
path: root/man/man3/memfrob.3
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-09-05 23:03:38 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-09-05 23:03:47 +0200
commit70ac1c4785fc1e158ab2349a962dba2526bf4fbc (patch)
treebff270e2496dd284bccfc1271b43946f5d225224 /man/man3/memfrob.3
parent5423a6f86b2b920a5f3e8cf8d759b513050f2d33 (diff)
downloadman-pages-70ac1c4785fc1e158ab2349a962dba2526bf4fbc.tar.gz
src.mk, All pages: Move man* to man/
The root of the repository is becoming a bit overpopulated and unorganized, due to the recent addition of more mandirs, and more informative and configuration files too. Let's create a specific mandir <man/> that contains the mandirs <man[1-8]*>. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'man/man3/memfrob.3')
-rw-r--r--man/man3/memfrob.365
1 files changed, 65 insertions, 0 deletions
diff --git a/man/man3/memfrob.3 b/man/man3/memfrob.3
new file mode 100644
index 0000000000..9f26f5e0f0
--- /dev/null
+++ b/man/man3/memfrob.3
@@ -0,0 +1,65 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.\" References consulted:
+.\" Linux libc source code
+.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\" 386BSD man pages
+.\" Modified Sat Jul 24 18:54:45 1993 by Rik Faith (faith@cs.unc.edu)
+.TH MEMFROB 3 2021-03-22 "Linux man-pages (unreleased)"
+.SH NAME
+memfrob \- frobnicate (obfuscate) a memory area
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
+.SH SYNOPSIS
+.nf
+.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
+.B #include <string.h>
+.PP
+.BI "void *memfrob(void *" s ", size_t " n );
+.fi
+.SH DESCRIPTION
+The
+.BR memfrob ()
+function obfuscates the first \fIn\fP bytes of the
+memory area \fIs\fP by exclusive-ORing each character with the number
+42.
+The effect can be reversed by using
+.BR memfrob ()
+on the
+obfuscated memory area.
+.PP
+Note that this function is not a proper encryption routine as the XOR
+constant is fixed, and is suitable only for hiding strings.
+.SH RETURN VALUE
+The
+.BR memfrob ()
+function returns a pointer to the obfuscated memory
+area.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.ad l
+.nh
+.TS
+allbox;
+lbx lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR memfrob ()
+T} Thread safety MT-Safe
+.TE
+.hy
+.ad
+.sp 1
+.SH STANDARDS
+The
+.BR memfrob ()
+function is unique to the
+GNU C Library.
+.SH SEE ALSO
+.BR bstring (3),
+.BR strfry (3)