RSACryptoServiceProvider.KeySize Property

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

Gets the size of the current key.

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

Syntax

'Declaration
Public Overrides ReadOnly Property KeySize As Integer
public override int KeySize { get; }

Property Value

Type: System.Int32
The size of the key in bits.

Remarks

Silverlight for Windows Phone In Silverlight for Windows Phone, the RSACryptoServiceProvider supports key lengths from 384 bits to 4800 bits in increments of 8 bits.

The RSACryptoServiceProvider class does not allow you to change key sizes using the KeySize property. Any value written to this property will fail to update the property without error. To change the key size, use one of the constructor overloads.

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.