Export (0) Print
Expand All

RSACryptoServiceProvider.PersistKeyInCsp Property

Gets or sets a value indicating whether the key should be persisted in the cryptographic service provider (CSP).

Namespace:  System.Security.Cryptography
Assembly:  mscorlib.Extensions (in mscorlib.Extensions.dll)

public bool PersistKeyInCsp { get; set; }

Property Value

Type: System.Boolean
true if the key should be persisted in the CSP; otherwise, false.

Use this property to persist a key in a key container.

The PersistKeyInCsp property is automatically set to true when you specify a key container name in a CspParameters object and use it to initialize an RSACryptoServiceProvider object. You can specify a container name using the KeyContainerName field.

If you set the PersistKeyInCsp property to true without initializing the RSACryptoServiceProvider object with a CspParameters object, a random key container name prepended with "CLR" is created.

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2015 Microsoft