Im having problems with my code which is supposed to decrypt a Chrome Browser Passwords file The decryption process in my code looks like this:
for info in value:
password = win32crypt.CryptUnprotectData(info[2], None, None, None, 0)[1]
if password:
result += 'Host: %s\nLogin: %s\nPassword: %s\n\n' % (info[:2] + (password.decode('utf-8'),))
Using this code however throws up an exception:
Key is not valid in specified state
I know that this basically means that the decryption key is wrong. But I dont really get why. Im decripting the file on the same computer the Browser Password file is on. Why does this error still occur?