C# Class Dev2.Runtime.Security.RSAKey

A RSA key in base64.
Show file Open project: Warewolf-ESB/Warewolf

Public Methods

Method Description
Load ( string filePath ) : RSAKey

Loads an RSAKey from a file.

RSAKey ( ) : System

Initializes a new instance of the RSAKey class with a new RSACryptoServiceProvider.

RSAKey ( ICspAsymmetricAlgorithm csp ) : System

Initializes a new instance of the RSAKey class.

RSAKey ( System.Xml.Linq.XContainer xml ) : System

Initializes a new instance of the RSAKey class.

Save ( string filePath ) : void

Saves this key to the specified file path.

ToCSP ( bool usePrivate ) : RSACryptoServiceProvider

Creates an RSACryptoServiceProvider from this instance.

ToXml ( ) : System.Xml.Linq.XElement

Creates an XML representation of this instance.

Method Details

Load() public static method

Loads an RSAKey from a file.
public static Load ( string filePath ) : RSAKey
filePath string The file path referencing the file to load into a new .
return RSAKey

RSAKey() public method

Initializes a new instance of the RSAKey class with a new RSACryptoServiceProvider.
public RSAKey ( ) : System
return System

RSAKey() public method

Initializes a new instance of the RSAKey class.
csp
public RSAKey ( ICspAsymmetricAlgorithm csp ) : System
csp ICspAsymmetricAlgorithm The to be used.
return System

RSAKey() public method

Initializes a new instance of the RSAKey class.
xml
public RSAKey ( System.Xml.Linq.XContainer xml ) : System
xml System.Xml.Linq.XContainer The xml represention to be loaded.
return System

Save() public method

Saves this key to the specified file path.
public Save ( string filePath ) : void
filePath string The file path to be used.
return void

ToCSP() public method

Creates an RSACryptoServiceProvider from this instance.
public ToCSP ( bool usePrivate ) : RSACryptoServiceProvider
usePrivate bool If true uses the key; otherwise uses the key.
return System.Security.Cryptography.RSACryptoServiceProvider

ToXml() public method

Creates an XML representation of this instance.
public ToXml ( ) : System.Xml.Linq.XElement
return System.Xml.Linq.XElement