title: TypeError: from_buffer() cannot return the address of a unicode object
body: <p>While updating a tool to python3, I have been facing this issue on MacOS.</p>
  
  <pre><code>print(args.secret)
  h = hmac.HMAC(args.secret.decode("hex"),hashes.SHA512(),backend=default_backend())
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>39830c786a16
  
  h = hmac.HMAC(hex(int(args.secret, 16)), hashes.SHA512(), backend=default_backend())
    File "/usr/local/lib/python3.7/site-packages/cryptography/hazmat/primitives/hmac.py", line 31, in __init__
      self._ctx = self._backend.create_hmac_ctx(key, self.algorithm)
    File "/usr/local/lib/python3.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 202, in create_hmac_ctx
      return _HMACContext(self, key, algorithm)
    File "/usr/local/lib/python3.7/site-packages/cryptography/hazmat/backends/openssl/hmac.py", line 34, in __init__
      key_ptr = self._backend._ffi.from_buffer(key)
  TypeError: from_buffer() cannot return the address of a unicode object
  
  </code></pre>
  
  <p>Possibly, it is an issue with the cryptography package. Some answers suggest reinstalling the cryptography package and its dependencies. (cffi, pycparser, six)</p>
  
  <pre><code>pip3 list
  </code></pre>
  
  <pre><code>six             1.14.0
  cryptography    2.8
  pycparser       2.19
  cffi            1.13.2
  </code></pre>
  
  <p>Still doesn't work. Has someone run into similar issues?</p>