1MEMFROB(3)                 Linux Programmer's Manual                MEMFROB(3)
2
3
4

NAME

6       memfrob - frobnicate (encrypt) a memory area
7

SYNOPSIS

9       #define _GNU_SOURCE             /* See feature_test_macros(7) */
10       #include <string.h>
11
12       void *memfrob(void *s, size_t n);
13

DESCRIPTION

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

RETURN VALUE

23       The memfrob() function returns a pointer to the encrypted memory area.
24

ATTRIBUTES

26       For  an  explanation  of  the  terms  used   in   this   section,   see
27       attributes(7).
28
29       ┌──────────┬───────────────┬─────────┐
30Interface Attribute     Value   
31       ├──────────┼───────────────┼─────────┤
32memfrob() │ Thread safety │ MT-Safe │
33       └──────────┴───────────────┴─────────┘

CONFORMING TO

35       The memfrob() function is unique to the GNU C Library.
36

SEE ALSO

38       bstring(3), strfry(3)
39

COLOPHON

41       This  page  is  part of release 4.15 of the Linux man-pages project.  A
42       description of the project, information about reporting bugs,  and  the
43       latest     version     of     this    page,    can    be    found    at
44       https://www.kernel.org/doc/man-pages/.
45
46
47
48GNU                               2017-03-13                        MEMFROB(3)
Impressum