Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
RSACryptoServiceProvider Constructor (Int32)

RSACryptoServiceProvider Constructor (Int32)

Initializes a new instance of the RSACryptoServiceProvider class with the specified key size.

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

[SecuritySafeCriticalAttribute]
public RSACryptoServiceProvider(
	int keySize
)

Parameters

keySize
Type: System.Int32

ExceptionCondition
CryptographicException

The cryptographic service provider (CSP) cannot be acquired.

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).

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

ADD
Show:
© 2015 Microsoft