title: Reverse process of XOR
body: <p>I was thinking, when two byte array is <strong>XOR</strong>'ed, is there any way to reverse the process? As I am curious to find the answer I found this code in the google which is the <strong>XOR</strong> code and this is the pseudocode of step1 (<strong>XOR</strong> code)</p>
  
  <p><img src="https://i.stack.imgur.com/7fnEW.png" alt="enter image description here"></p>
  
  <p>The <strong>XOR</strong> code: </p>
  
  <pre><code>public static byte[] XOR(byte[] first, byte[] second)
      {
          if (first.Length == second.Length)
          {
              byte[] result = new byte[first.Length];
              for (int i = 0; i &lt; first.Length; i++)
              {
                  result[i] = (byte)(first[i] ^ second[i]);
              }
  
              return result;
          }
          else
          {
              throw new ArgumentException();
          }
      }
  </code></pre>
  
  <p>The code works fine. Now down below is the pseudocode of step2 (reverse of <strong>XOR</strong> code) 
  <img src="https://i.stack.imgur.com/raQ6w.png" alt="enter image description here"></p>
  
  <p>I am very confused how to do this step2. How can I reverse the process to get back the original byte arrays? As the only input I have is the <code>result</code>. Is this ever possible? Is there any way to do this? If the answer is yes then how? </p>