ABC
ABC

Reputation: 695

Access RSA key container

I have generated a RSA key using aspnet_regiis.exe and installed it on a target machine. How do I access it using C# code?

I want it of type System.Security.Cryptography.RSA.

I will update the question, when I figure out. In the meantime, any pointers will be appreciated.

Upvotes: 2

Views: 691

Answers (1)

poupou
poupou

Reputation: 43553

The key to select a specific container is to create CspParameters instance and use it when creating your RSACryptoServiceProvider.

The difficulty is to set the right parameters. You might have to delve into older CryptoAPI documentation to find every flags (unless MSDN documentation got a lot better in the last years).

Upvotes: 1

Related Questions