Class Asymmetric.PublicKey
- Namespace
- SunamoShared.Crypting
- Assembly
- SunamoShared.dll
Represents a public encryption key. Intended to be shared, it contains only the Modulus and Exponent.
public class Asymmetric.PublicKey
- Inheritance
-
Asymmetric.PublicKey
- Inherited Members
- Extension Methods
Constructors
PublicKey()
Initializes a new instance of the Asymmetric.PublicKey class.
public PublicKey()
PublicKey(string)
Initializes a new instance of the Asymmetric.PublicKey class from an XML string containing Modulus and Exponent tags.
public PublicKey(string keyXml)
Parameters
keyXmlstringThe XML string containing the public key data.
Fields
Exponent
The exponent component of the public key.
public string Exponent
Field Value
Modulus
The modulus component of the public key.
public string Modulus
Field Value
Methods
ExportToConfigFile(string)
Writes the *.config file representation of this public key to a file.
public void ExportToConfigFile(string filePath)
Parameters
filePathstringThe file path to write the config section to.
ExportToXmlFile(string)
Writes the XML representation of this public key to a file.
public void ExportToXmlFile(string filePath)
Parameters
filePathstringThe file path to write the XML to.
LoadFromConfig()
Loads the public key from App.config or Web.config file.
public void LoadFromConfig()
LoadFromXml(string)
Loads the public key from its XML string.
public void LoadFromXml(string keyXml)
Parameters
keyXmlstringThe XML string containing the public key data.
ToConfigSection()
Returns *.config file XML section representing this public key.
public string ToConfigSection()
Returns
ToParameters()
Converts this public key to an RSAParameters object.
public RSAParameters ToParameters()
Returns
ToXml()
Converts this public key to its XML string representation.
public string ToXml()