I use the identical call to "CryptUnprotectData" (represented by Crypt32.dll) between XP and Vista. Works great in XP. When starting up in Vista, I get the following exception:
"Decryption failed. Key not valid for use in specified state."
As expected, the versions of crypt32.dll differ between XP and Vista (w / XP actually has a more recent one, possibly as a result of SP3 or some other update).
In particular, I encrypt the data by putting it in the registry, and then reading and decrypting it using "CryptUnprotectData". UAC is off.
Has anyone seen this before?
source
share