KeySize Property
Collapse the table of content
Expand the table of content

RSACryptoServiceProvider.KeySize Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the size of the current key.

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

public override int KeySize { get; }

Property Value

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

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

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

© 2016 Microsoft