Chilkat VB.NET PublicKey Class Reference
PublicKey
* This is a freeware class/component/library.
Represents an RSA public key. Provides methods for importing and exporting to/from OpenSSL DER and PEM formats, RSA DER format, and XML format. Public keys can be imported/exported to both memory and files.
Properties
LastErrorHtml As String (ReadOnly)
Error information in HTML format for the last method called.
LastErrorText As String (ReadOnly)
Error information in plain-text format for the last method called.
LastErrorXml As String (ReadOnly)
Error information in XML format for the last method called.
Methods
Function GetOpenSslDer() As Byte()
Gets the public key in OpenSSL DER format. Returns a byte array. Returns Nothing on failure
Function GetOpenSslPem() As String
Gets the public key in OpenSSL PEM format. Returns Nothing on failure
Function GetRsaDer() As Byte()
Gets the public key in RSA DER format. Returns a byte array. Returns Nothing on failure
Function GetXml() As String
Gets the public key in XML format. The XML has this format where the key parts are base64 encoded:
<RSAKeyValue>
<Modulus>...</Modulus>
<Exponent>...</Exponent>
</RSAKeyValue>
Returns Nothing on failure
Function LoadOpenSslDer(ByVal data As Byte()) As Boolean
Loads a public key from in-memory OpenSSL DER formatted byte data. Returns true for success, false for failure.
Function LoadOpenSslDerFile(ByVal filename As String) As Boolean
Loads a public key from an OpenSSL DER format file. Returns true for success, false for failure.
Function LoadOpenSslPem(ByVal str As String) As Boolean
Loads a public key from an OpenSSL PEM string. Returns true for success, false for failure.
Function LoadOpenSslPemFile(ByVal filename As String) As Boolean
Loads a public key from an OpenSSL PEM file. Returns true for success, false for failure.
Function LoadRsaDer(ByVal data As Byte()) As Boolean
Loads a public key from in-memory RSA DER formatted byte data. Returns true for success, false for failure.
Function LoadRsaDerFile(ByVal filename As String) As Boolean
Loads a public key from an RSA DER formatted file. Returns true for success, false for failure.
Function LoadXml(ByVal xml As String) As Boolean
Loads a public key from an XML string. Returns true for success, false for failure.
Function LoadXmlFile(ByVal filename As String) As Boolean
Loads a public key from an XML file. Returns true for success, false for failure.
Function SaveLastError(ByVal filename As String) As Boolean
Saves the last error information to an XML formatted file.
Function SaveOpenSslDerFile(ByVal filename As String) As Boolean
Saves the public key to an OpenSSL DER format file. Returns true for success, false for failure.
Function SaveOpenSslPemFile(ByVal filename As String) As Boolean
Saves the public key to an OpenSSL PEM format file. Returns true for success, false for failure.
Function SaveRsaDerFile(ByVal filename As String) As Boolean
Saves the public key to an RSA DER format file. Returns true for success, false for failure.
Function SaveXmlFile(ByVal filename As String) As Boolean
Saves the public key to an XML file. Returns true for success, false for failure.
|