(libc.info.gz) Trivial Encryption
Info Catalog
(libc.info.gz) strfry
(libc.info.gz) String and Array Utilities
(libc.info.gz) Encode Binary Data
5.10 Trivial Encryption
=======================
The 'memfrob' function converts an array of data to something
unrecognizable and back again. It is not encryption in its usual sense
since it is easy for someone to convert the encrypted data back to clear
text. The transformation is analogous to Usenet's "Rot13" encryption
method for obscuring offensive jokes from sensitive eyes and such.
Unlike Rot13, 'memfrob' works on arbitrary binary data, not just text.
For true encryption, Cryptographic Functions.
This function is declared in 'string.h'.
-- Function: void * memfrob (void *MEM, size_t LENGTH)
Preliminary: | MT-Safe | AS-Safe | AC-Safe | POSIX Safety
Concepts.
'memfrob' transforms (frobnicates) each byte of the data structure
at MEM, which is LENGTH bytes long, by bitwise exclusive oring it
with binary 00101010. It does the transformation in place and its
return value is always MEM.
Note that 'memfrob' a second time on the same data structure
returns it to its original state.
This is a good function for hiding information from someone who
doesn't want to see it or doesn't want to see it very much. To
really prevent people from retrieving the information, use stronger
encryption such as that described in Cryptographic
Functions.
*Portability Note:* This function is unique to the GNU C Library.
Info Catalog
(libc.info.gz) strfry
(libc.info.gz) String and Array Utilities
(libc.info.gz) Encode Binary Data
automatically generated by
info2html