Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Developing 64 bit applications that use MS CryptoAPI

I am a C++ developer, but don't have a strong background in Windows development.

My main question revolves around the use of the Crypto API. I will use functions like CryptAcquireContext. While researching more about this API, described only as "Win32 Crypto API." I wonder if there is "Win64 Crypto API"?

If not, if I develop an application that makes use of "Win32 Crypto API" in Visual Studio and compile as 64 bit mode. It would be better if I had compiled in 32 bit?

What do I have do to develop a 64 bit application that makes use of the Crypto API?

If possible, report any problems you had developing applications for 64 bit while using the crypto API, retrieve certificates, carry signatures, etc..

Articles are very welcome.

like image 859
Cobaia Avatar asked Dec 16 '22 03:12

Cobaia


1 Answers

The crypto api works fine in 64 bit, just use %ProgramFiles%\Microsoft SDKs\Windows\vX.X\Lib\x64 as your library instead of %ProgramFiles%\Microsoft SDKs\Windows\vX.X\Lib and it will work fine, there should be no differences between the 32 bit and the 64 bit library that is not handled by using the correct data types for the calls (specifically pointer width)

like image 74
Scott Chamberlain Avatar answered Feb 20 '23 02:02

Scott Chamberlain