title: Python3 CryptUnprotectData() TypeError expected an object with a buffer interface
body: <p>I was browsing over the net for some information about CryptUnprotectData and WZC. I found this small script that is used for decrypting stored Wireless passwords on Vista. I tried with Python3 (it was written probably for Python 2.X) but it gives me: TypeError expected an object with a buffer interface. I'm not quite sure how to fix it.
  It is simple script:</p>
  
  <pre><code>    import win32crypt
      mykey = "Insert keyMaterial"
      binout = []
      for i in range(len(mykey)):
          if i % 2 == 0:
              binout.append(chr(int(mykey[i:i+2],16)))
      pwdHash=''.join(binout)
  
      output = win32crypt.CryptUnprotectData(pwdHash,None,None,None,0)
  
      print ("hex:", "".join(["%02X" % ord(char) for char in output[1]]))
  
      print ("ascii:", output[1])
  </code></pre>
  
  <p>Script is from <a href="http://jbarillari.blogspot.com/2009/06/security-lols.html" rel="nofollow">here</a></p>