Hi
i have a question regarding the CryptoAPI.
I can seemingly call CryptAcquireContext, and if I pass any random string as
the key container name and NULL as the provider name, with CRYPT_NEWKEYSET
as the last parameter, then the rest of the crypt functions seem to work.
But I came across an instance when I stopped debugging the program, before I
had called CryptReleaseContext, and when I ran the program again, I got
FALSE returned, and !gle returned something like "The specified keyset
already exists". Presumably, the CSP can only service one unique "keyset" at
once, and if it is already "checked out", it can't service another request
for the same keyset name?
I want to write this in a DLL, and I would call CryptReleaseContext at the
end of the encrypting/decrypting method.
But what if more than one application was using the DLL at once, could
somebody confirm whether you're supposed to use a unique string for the
keyname for each application? What if two instances of the same application
were running at once and both doing cryptography at the same time?
(unlikely, but possible...)