Loads the public key (and optionally the private key) from an XML file. The XML file 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 LoadKeyFromXmlFile(
	RSA rsaEncryptor,
	string publicKeyFile
)
Visual Basic
Public Shared Function LoadKeyFromXmlFile ( _
	rsaEncryptor As RSA, _
	publicKeyFile As String _
) As RSA
Visual C++
public:
static RSA^ LoadKeyFromXmlFile(
	RSA^ rsaEncryptor, 
	String^ publicKeyFile
)

Parameters

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

Return Value

An RSA object containing the key

Exceptions

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

See Also