The CspParameters class represents parameters that you can pass to managed cryptography classes that internally use Microsoft Cryptographic Service Providers (CSPs) from the unmanaged Microsoft Cryptography API (CAPI). Classes with names ending in "CryptoServiceProvider" are managed code wrappers for the corresponding CSP.

Use the CspParameters class to do the following:

Specify a particular CSP by passing the provider type to the ProviderType or ProviderName property. You can also specify a CSP using an overload of the constructor.

Create a key container where you can store cryptographic keys. Key containers provide the most secure way to persist cryptographic keys and keep them secret from malicious third parties. For more information about creating key containers, see How to: Store Asymmetric Keys in a Key Container.

Specify whether to create an asymmetric signature key or an asymmetric exchange key using the KeyNumber property.