]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/memfrob.3
Many pages: Use correct letter case in page titles (TH)
[thirdparty/man-pages.git] / man3 / memfrob.3
CommitLineData
fea681da
MK
1.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2.\"
5fbde956 3.\" SPDX-License-Identifier: Linux-man-pages-copyleft
fea681da
MK
4.\"
5.\" References consulted:
6.\" Linux libc source code
7.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
8.\" 386BSD man pages
9.\" Modified Sat Jul 24 18:54:45 1993 by Rik Faith (faith@cs.unc.edu)
4c1c5274 10.TH memfrob 3 (date) "Linux man-pages (unreleased)"
fea681da 11.SH NAME
c6950157 12memfrob \- frobnicate (obfuscate) a memory area
60d73dbb
AC
13.SH LIBRARY
14Standard C library
8fc3b2cf 15.RI ( libc ", " \-lc )
fea681da
MK
16.SH SYNOPSIS
17.nf
86b91fdf 18.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
fea681da 19.B #include <string.h>
68e4db0a 20.PP
fea681da
MK
21.BI "void *memfrob(void *" s ", size_t " n );
22.fi
23.SH DESCRIPTION
60a90ecd
MK
24The
25.BR memfrob ()
c6950157 26function obfuscates the first \fIn\fP bytes of the
fea681da 27memory area \fIs\fP by exclusive-ORing each character with the number
1c44bd5b 2842.
60a90ecd
MK
29The effect can be reversed by using
30.BR memfrob ()
31on the
c6950157 32obfuscated memory area.
fea681da
MK
33.PP
34Note that this function is not a proper encryption routine as the XOR
33a0ccb2 35constant is fixed, and is suitable only for hiding strings.
47297adb 36.SH RETURN VALUE
60a90ecd
MK
37The
38.BR memfrob ()
c6950157 39function returns a pointer to the obfuscated memory
fea681da 40area.
60ca99ee 41.SH ATTRIBUTES
c3b39c34
PH
42For an explanation of the terms used in this section, see
43.BR attributes (7).
c466875e
MK
44.ad l
45.nh
c3b39c34
PH
46.TS
47allbox;
c466875e 48lbx lb lb
c3b39c34
PH
49l l l.
50Interface Attribute Value
51T{
60ca99ee 52.BR memfrob ()
c3b39c34
PH
53T} Thread safety MT-Safe
54.TE
c466875e
MK
55.hy
56.ad
57.sp 1
3113c7f3 58.SH STANDARDS
60a90ecd
MK
59The
60.BR memfrob ()
61function is unique to the
fea681da 62GNU C Library.
47297adb 63.SH SEE ALSO
879091c9 64.BR bstring (3),
fea681da 65.BR strfry (3)