Python to exe win32crypt CryptProtectData error
<p>I wrote code which is using win32crypt. When I'm running in Python IDLE there is no problem. I get all data that I need.
 But when i'm converted to .exe and executed it I didn't get any result. I get this error</p>

<blockquote>
  <p>Traceback (most recent call last):   File "chromeHack.py", line 22, in
   pywintypes.error: (998, 'CryptProtectData',
  '\xcd\xe5\xe2\xe5\xf0\xed\xe0\xff \xef\xee\xef\xfb\xf2\xea\xe0
  \xe4\xee\xf1\xf2\xf3\xef\xe0 \xea \xe0\xe4\xf0\xe5\xf1\xf3
  \xef\xe0\xec\xff\xf2\xe8.')</p>
</blockquote>

<p>Line 22 is </p>

<pre><code>password = win32crypt.CryptUnprotectData(raw[2])[1]
fileOut.write(password + '\n')
</code></pre>

<p>.exe can't use windows password to decrypt data. I tried to run as administrator but same result.</p>

<p>You have to run in system command(windows?cmd:shell) to test the code before changing the code to exe.</p>

<p>The result told you that you have a wrong returned value after using the win32crypt.CryptUnprotectData.</p>

<p>the correct usage:
<a href="http://timgolden.me.uk/pywin32-docs/win32crypt__CryptUnprotectData_meth.html" rel="nofollow">win32crypt.CryptUnprotectData</a></p>

python winapi