How to do <xor> in python e.g. enc_price = pad <xor> price
<p>I am new to crypto and I am trying to interpret the below code.  Namely, what does <code>&lt;xor&gt;</code> mean?</p>

<p>I have a secret_key secret key.  I also have a unique_id. I create pad using the below code. </p>

<pre><code>pad = hmac.new(secret_key, msg=unique_id, digestmod=hashlib.sha1).digest()
</code></pre>

<p>Once the pad is created, I have a price e.g. 1000. I am trying to follow this instruction which is pseudocode:</p>

<pre><code>enc_price = pad &lt;xor&gt; price
</code></pre>

<p>In Python, what is the code to implement <code>enc_price = pad &lt;xor&gt; price</code>?  What is the logic behind doing this?</p>

<p>As a note, a complete description of what I want to do here here:
<a href="https://developers.google.com/ad-exchange/rtb/response-guide/decrypt-price" rel="nofollow">https://developers.google.com/ad-exchange/rtb/response-guide/decrypt-price</a></p>

<p><a href="https://developers.google.com/ad-exchange/rtb/response-guide/decrypt-price" rel="nofollow">developers.google.com/ad-exchange/rtb/response-guide/decrypt-price</a></p>

<p>Thanks</p>
