title: Is Python's hashlib.sha256(x).hexdigest() equivalent to Rs digest(x,algo="sha256")
body: <p>I'm not a python programmer, but I'm trying to translate some Python code to R.  The piece of python code I'm having trouble with is:</p>
  
  <pre><code>hashlib.sha256(x).hexdigest()
  </code></pre>
  
  <p>My interpretation of this code is that the function is going to calculate the hash of x using the sha256 algorithm and return the value in hex.</p>
  
  <p>Given that interpretation, I am using the following R function:</p>
  
  <pre><code>digest(x, algo="sha256", raw=FALSE)
  </code></pre>
  
  <p>Based upon my albeit limited knowledge of R and what I have read online on Python's hashlib function the two functions should be producing identical results, but they are not.  &nbsp;</p>
  
  <p>Am I missing something or am I using the wrong R function.  </p>