Export (0) Print
Expand All

RSA.FromXmlString Method

Initializes an RSA object from the key information from an XML string.

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

'Declaration
Public Overrides Sub FromXmlString ( _
	xmlString As String _
)
'Usage
Dim instance As RSA
Dim xmlString As String

instance.FromXmlString(xmlString)
public void FromXmlString (
	String xmlString
)
public override function FromXmlString (
	xmlString : String
)
Not applicable.

Parameters

xmlString

The XML string containing RSA key information.

Exception typeCondition

ArgumentNullException

The xmlString parameter is a null reference (Nothing in Visual Basic).

CryptographicException

The format of the xmlString parameter is not valid.

The FromXmlString initializes an RSA object using key information in an XML string that was generated using the ToXmlString method. The FromXmlString method accepts either an XML string containing a public key or an XML string containing a public and private key.

Use the FromXmlString method to conveniently initialize RSA key information.

Caution noteCaution:

Persisting an XML string containing a private key to an insecure location is a security threat. The security of your application can be compromised if a malicious third party can access your private key. To safely persist a private key, use a secure key container. For more information about persisting private keys in a key container, see How to: Store Asymmetric Keys in a Key Container.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft