Udostępnij za pośrednictwem


RSACryptoServiceProvider Constructor

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Initializes a new instance of the RSACryptoServiceProvider class using the default key.

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

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
Public Sub New
[SecuritySafeCriticalAttribute]
public RSACryptoServiceProvider()

Exceptions

Exception Condition
CryptographicException

The cryptographic service provider (CSP) cannot be acquired.

Remarks

If no default key is found, a new key is created.

This constructor creates an Exchange key pair suitable to encrypt session keys so that they can be safely stored and exchanged with other users. The generated key corresponds to a key generated using the AT_KEYEXCHANGE value used in the unmanaged Microsoft Cryptographic API (CAPI).

Version Information

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

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