1memfrob(3)                 Library Functions Manual                 memfrob(3)
2
3
4

NAME

6       memfrob - frobnicate (obfuscate) a memory area
7

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

12       #define _GNU_SOURCE             /* See feature_test_macros(7) */
13       #include <string.h>
14
15       void *memfrob(void s[.n], size_t n);
16

DESCRIPTION

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

RETURN VALUE

26       The memfrob() function returns a pointer to the obfuscated memory area.
27

ATTRIBUTES

29       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
30       tributes(7).
31
32       ┌────────────────────────────────────────────┬───────────────┬─────────┐
33Interface                                   Attribute     Value   
34       ├────────────────────────────────────────────┼───────────────┼─────────┤
35memfrob()                                   │ Thread safety │ MT-Safe │
36       └────────────────────────────────────────────┴───────────────┴─────────┘
37

STANDARDS

39       GNU.
40

SEE ALSO

42       bstring(3), strfry(3)
43
44
45
46Linux man-pages 6.04              2023-03-30                        memfrob(3)
Impressum