Encryption / Decryption on machines - no no

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?

+3
source share
2 answers

CryptUnprotectData function , , , encrypter.

, , , . Vista, UAC .

- ? , - .. ?

+4

. , !; -)

, , , .

. , ( XP) Vista.

MSDN:

, , . , .

Vista, .

.

+1

Source: https://habr.com/ru/post/1696879/


All Articles