Creates an RSA key or pair of keys (public or public with private) from an XML string. The XML string must adhere to the RSAKeyValue XML schema.

Namespace: LLCryptoLib.Crypto
Assembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)

Syntax

C#
public static RSA KeyFromXml(
	RSA rsaEncryptor,
	string xmlCertificate
)
Visual Basic
Public Shared Function KeyFromXml ( _
	rsaEncryptor As RSA, _
	xmlCertificate As String _
) As RSA
Visual C++
public:
static RSA^ KeyFromXml(
	RSA^ rsaEncryptor, 
	String^ xmlCertificate
)

Parameters

rsaEncryptor
Type: System.Security.Cryptography..::..RSA
An object implementing RSA, as RSACryptoServiceProvider.
xmlCertificate
Type: System..::..String
The public/private key file as XML string.

Return Value

An RSA object containing the key.

Exceptions

ExceptionCondition
LLCryptoLib..::..LLCryptoLibExceptionPublic Key format not recognized.
System..::..ArgumentNullException

See Also