CkPublicKey Python Programming Reference Documentation
CkPublicKey
* 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
# str is a CkString object (output) LastErrorHtml( str )
Error information in HTML format for the last method called.
# str is a CkString object (output) LastErrorText( str )
Error information in plain-text format for the last method called.
# str is a CkString object (output) LastErrorXml( str )
Error information in XML format for the last method called.
# Returns a boolean value get_Utf8( )
# b is a boolean (input) put_Utf8( b )
When set to true, all "const char *" arguments are expected to be utf-8 strings. If set to false, the "const char *" arguments are expected to be ANSI strings.
Methods
# data is a CkByteData object (output) # Returns a boolean value GetOpenSslDer( data )
Gets the public key in OpenSSL DER format.
# str is a CkString object (output) # Returns a boolean value GetOpenSslPem( str )
Gets the public key in OpenSSL PEM format. Returns True for success, False for failure.
# data is a CkByteData object (output) # Returns a boolean value GetRsaDer( data )
Gets the public key in RSA DER format.
# str is a CkString object (output) # Returns a boolean value GetXml( str )
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 True for success, False for failure.
# data is a CkByteData object (output) # Returns a boolean value LoadOpenSslDer( data )
Loads a public key from in-memory OpenSSL DER formatted byte data. Returns True for success, False for failure.
# filename is a string (input) # Returns a boolean value LoadOpenSslDerFile( filename )
Loads a public key from an OpenSSL DER format file. Returns True for success, False for failure.
# str is a string (input) # Returns a boolean value LoadOpenSslPem( str )
Loads a public key from an OpenSSL PEM string. Returns True for success, False for failure.
# filename is a string (input) # Returns a boolean value LoadOpenSslPemFile( filename )
Loads a public key from an OpenSSL PEM file. Returns True for success, False for failure.
# data is a CkByteData object (output) # Returns a boolean value LoadRsaDer( data )
Loads a public key from in-memory RSA DER formatted byte data. Returns True for success, False for failure.
# filename is a string (input) # Returns a boolean value LoadRsaDerFile( filename )
Loads a public key from an RSA DER formatted file. Returns True for success, False for failure.
# xml is a string (input) # Returns a boolean value LoadXml( xml )
Loads a public key from an XML string. Returns True for success, False for failure.
# filename is a string (input) # Returns a boolean value LoadXmlFile( filename )
Loads a public key from an XML file. Returns True for success, False for failure.
# filename is a string (input) # Returns a boolean value SaveLastError( filename )
Saves the last error information to an XML formatted file.
# filename is a string (input) # Returns a boolean value SaveOpenSslDerFile( filename )
Saves the public key to an OpenSSL DER format file. Returns True for success, False for failure.
# filename is a string (input) # Returns a boolean value SaveOpenSslPemFile( filename )
Saves the public key to an OpenSSL PEM format file. Returns True for success, False for failure.
# filename is a string (input) # Returns a boolean value SaveRsaDerFile( filename )
Saves the public key to an RSA DER format file. Returns True for success, False for failure.
# filename is a string (input) # Returns a boolean value SaveXmlFile( filename )
Saves the public key to an XML file. Returns True for success, False for failure.
# Returns a string getOpenSslPem( )
Gets the public key in OpenSSL PEM format.
# Returns a string getXml( )
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 a string lastErrorHtml( )
Error information in HTML format for the last method called.
# Returns a string lastErrorText( )
Error information in plain-text format for the last method called.
# Returns a string lastErrorXml( )
Error information in XML format for the last method called.
|