title: Design and usage of the memfrob function
body: <p>From the <a href="http://linux.die.net/man/3/memfrob" rel="noreferrer">man page of <code>memfrob</code></a>:</p>
  
  <blockquote>
  <pre><code>void *memfrob(void *s, size_t n);
  </code></pre>
    
    <p>The <strong>memfrob</strong>() function
    encrypts the first <em>n</em> bytes of the memory area <em>s</em> by exclusive-ORing
    each character with the number 42. The effect can be reversed by using
    <strong>memfrob</strong>() on the encrypted memory area. </p>
    
    <p>Note that this function is not a proper encryption routine as the XOR
    constant is fixed, and is only suitable for hiding strings.</p>
  </blockquote>
  
  <p>I have the following questions regarding the <code>memfrob</code> function:</p>
  
  <ol>
  <li>Why is the XORing done with number 42?</li>
  <li>Is there any reason why XOR constant is fixed and why the designers of <code>memfrob</code> did not leave choice of the constant to the user?</li>
  <li>In what sense is it suitable for hiding strings? Since it can be reversed and therefore shouldn't be used in applications where encryption is important, what it is used for on practice? </li>
  </ol>