Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have written a WIN32 App that Encrypts and Decrypts a string that is stored in the registry by my server program. Once the server program creates the encrypted string, it then uses that string to determine when the license has ended. The WIN32 app runs at the command line and gives the correct decrypted value. However, when PHP calls this same command (KeyCheck.exe) I get 0x80070002 file not found on the Initialization of the CCryptProv.

code:
C#
CCryptProv provider;
hr = provider.Initialize(PROV_RSA_FULL, NULL, MS_ENHANCED_PROV);


hr always returns 0x80070002.

What I have tried:

Looked the running DLLs, and I see the advapi32.dll is available (registered) - tried three different encrypt/decrypt but it all comes back to the file not found error.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900