1memfrob(3) Library Functions Manual memfrob(3)
2
3
4
6 memfrob - frobnicate (obfuscate) a memory area
7
9 Standard C library (libc, -lc)
10
12 #define _GNU_SOURCE /* See feature_test_macros(7) */
13 #include <string.h>
14
15 void *memfrob(void s[.n], size_t n);
16
18 The memfrob() function obfuscates the first n bytes of the memory area
19 s by exclusive-ORing each character with the number 42. The effect can
20 be reversed by using memfrob() on the obfuscated memory area.
21
22 Note that this function is not a proper encryption routine as the XOR
23 constant is fixed, and is suitable only for hiding strings.
24
26 The memfrob() function returns a pointer to the obfuscated memory area.
27
29 For an explanation of the terms used in this section, see at‐
30 tributes(7).
31
32 ┌────────────────────────────────────────────┬───────────────┬─────────┐
33 │Interface │ Attribute │ Value │
34 ├────────────────────────────────────────────┼───────────────┼─────────┤
35 │memfrob() │ Thread safety │ MT-Safe │
36 └────────────────────────────────────────────┴───────────────┴─────────┘
37
39 GNU.
40
42 bstring(3), strfry(3)
43
44
45
46Linux man-pages 6.05 2023-07-20 memfrob(3)