1MEMFROB(3) Linux Programmer's Manual MEMFROB(3)
2
3
4
6 memfrob - frobnicate (encrypt) a memory area
7
9 #define _GNU_SOURCE /* See feature_test_macros(7) */
10 #include <string.h>
11
12 void *memfrob(void *s, size_t n);
13
15 The memfrob() function encrypts the first n bytes of the memory area s
16 by exclusive-ORing each character with the number 42. The effect can
17 be reversed by using memfrob() on the encrypted memory area.
18
19 Note that this function is not a proper encryption routine as the XOR
20 constant is fixed, and is suitable only for hiding strings.
21
23 The memfrob() function returns a pointer to the encrypted memory area.
24
26 For an explanation of the terms used in this section, see at‐
27 tributes(7).
28
29 ┌────────────────────────────────────────────┬───────────────┬─────────┐
30 │Interface │ Attribute │ Value │
31 ├────────────────────────────────────────────┼───────────────┼─────────┤
32 │memfrob() │ Thread safety │ MT-Safe │
33 └────────────────────────────────────────────┴───────────────┴─────────┘
34
36 The memfrob() function is unique to the GNU C Library.
37
39 bstring(3), strfry(3)
40
42 This page is part of release 5.13 of the Linux man-pages project. A
43 description of the project, information about reporting bugs, and the
44 latest version of this page, can be found at
45 https://www.kernel.org/doc/man-pages/.
46
47
48
49GNU 2021-03-22 MEMFROB(3)