C# Class Goedel.Mesh.PublicKey

Exibir arquivo Open project: hallambaker/Mathematical-Mesh Class Usage Examples

Protected Properties

Property Type Description
_KeyPair Goedel.Cryptography.KeyPair

Public Methods

Method Description
DeserializeToken ( JSONReader JSONReader, string Tag ) : void

Having read a tag, process the corresponding value data.

ExportPrivateParameters ( ) : void

Create a Private Parameters property that contains the private parameters of the key.

From ( byte _Data ) : PublicKey

Create a new instance from untagged byte input. i.e. {... data ... }

From ( string _Input ) : PublicKey

Create a new instance from untagged string input. i.e. {... data ... }

FromTagged ( JSONReader JSONReader ) : PublicKey

Deserialize a tagged stream

FromTagged ( byte _Data ) : PublicKey

Create a new instance from tagged byte input. i.e. { "PublicKey" : {... data ... } }

FromTagged ( string _Input ) : PublicKey

Create a new instance from tagged string input. i.e. { "PublicKey" : {... data ... } }

Generate ( KeyType KeyType, CryptoAlgorithmID CryptoAlgorithmID ) : PublicKey

Generate a new key pair and return a PublicKey object for the public parameters.

GetKeySecurity ( KeyType KeyType ) : KeySecurity

Return the initial key security level for a key type

ImportPrivateParameters ( ) : void

Create a provider object that includes the private key parameters and add this to the certificate.

PublicKey ( ) : System

Default Constructor

PublicKey ( JSONReader JSONReader ) : System

Initialize class from JSONReader stream.

PublicKey ( string _String ) : System

Initialize class from a JSON encoded class.

SelfSignCertificate ( Application PKIXUse ) : void

Create a self signed root certificate

Serialize ( Writer Writer, bool wrap, bool &first ) : void

Serialize this object to the specified output stream.

SerializeX ( Writer _Writer, bool _wrap, bool &_first ) : void

Serialize this object to the specified output stream. Unlike the Serlialize() method, this method is not inherited from the parent class allowing a specific version of the method to be called.

SignCertificate ( Application PKIXUse, PublicKey Signer ) : void

Create an application or intermediary certificate

SignCertificate ( Application PKIXUse, string SubjectAltName, PublicKey Signer ) : void

Create an application certificate with the specified SubjectAltName.

Tag ( ) : string

Tag identifying this class.

Verify ( ) : bool

Unpack that the public key parameters match the UDF fingerprint.

Verify ( string TestUDF ) : bool

Verify the keypair parameters match the fingerprint.

Private Methods

Method Description
GetKeyPair ( ) : KeyPair

Method Details

DeserializeToken() public method

Having read a tag, process the corresponding value data.
public DeserializeToken ( JSONReader JSONReader, string Tag ) : void
JSONReader JSONReader The input stream
Tag string The tag
return void

ExportPrivateParameters() public method

Create a Private Parameters property that contains the private parameters of the key.
public ExportPrivateParameters ( ) : void
return void

From() public static method

Create a new instance from untagged byte input. i.e. {... data ... }
public static From ( byte _Data ) : PublicKey
_Data byte The input data.
return PublicKey

From() public static method

Create a new instance from untagged string input. i.e. {... data ... }
public static From ( string _Input ) : PublicKey
_Input string The input data.
return PublicKey

FromTagged() public static method

Deserialize a tagged stream
public static FromTagged ( JSONReader JSONReader ) : PublicKey
JSONReader JSONReader The input stream
return PublicKey

FromTagged() public static method

Create a new instance from tagged byte input. i.e. { "PublicKey" : {... data ... } }
public static FromTagged ( byte _Data ) : PublicKey
_Data byte The input data.
return PublicKey

FromTagged() public static method

Create a new instance from tagged string input. i.e. { "PublicKey" : {... data ... } }
public static FromTagged ( string _Input ) : PublicKey
_Input string The input data.
return PublicKey

Generate() public static method

Generate a new key pair and return a PublicKey object for the public parameters.
public static Generate ( KeyType KeyType, CryptoAlgorithmID CryptoAlgorithmID ) : PublicKey
KeyType KeyType The mest key type.
CryptoAlgorithmID CryptoAlgorithmID The algorithm to generate keys for.
return PublicKey

GetKeySecurity() public static method

Return the initial key security level for a key type
public static GetKeySecurity ( KeyType KeyType ) : KeySecurity
KeyType KeyType Type of key
return KeySecurity

ImportPrivateParameters() public method

Create a provider object that includes the private key parameters and add this to the certificate.
public ImportPrivateParameters ( ) : void
return void

PublicKey() public method

Default Constructor
public PublicKey ( ) : System
return System

PublicKey() public method

Initialize class from JSONReader stream.
public PublicKey ( JSONReader JSONReader ) : System
JSONReader JSONReader Input stream
return System

PublicKey() public method

Initialize class from a JSON encoded class.
public PublicKey ( string _String ) : System
_String string Input string
return System

SelfSignCertificate() public method

Create a self signed root certificate
public SelfSignCertificate ( Application PKIXUse ) : void
PKIXUse Application Bit mask specifying certificate uses.
return void

Serialize() public method

Serialize this object to the specified output stream.
public Serialize ( Writer Writer, bool wrap, bool &first ) : void
Writer Writer Output stream
wrap bool If true, output is wrapped with object /// start and end sequences '{ ... }'.
first bool If true, item is the first entry in a list.
return void

SerializeX() public method

Serialize this object to the specified output stream. Unlike the Serlialize() method, this method is not inherited from the parent class allowing a specific version of the method to be called.
public SerializeX ( Writer _Writer, bool _wrap, bool &_first ) : void
_Writer Writer Output stream
_wrap bool If true, output is wrapped with object /// start and end sequences '{ ... }'.
_first bool If true, item is the first entry in a list.
return void

SignCertificate() public method

Create an application or intermediary certificate
public SignCertificate ( Application PKIXUse, PublicKey Signer ) : void
PKIXUse Application Bit mask specifying certificate uses.
Signer PublicKey The signing key (which must have an attached certificate).
return void

SignCertificate() public method

Create an application certificate with the specified SubjectAltName.
public SignCertificate ( Application PKIXUse, string SubjectAltName, PublicKey Signer ) : void
PKIXUse Application Bit mask specifying certificate uses.
SubjectAltName string The subjectAltName. Must be a DNS domain name /// or a RFC822 email address.
Signer PublicKey The signing key (which must have an attached certificate).
return void

Tag() public method

Tag identifying this class.
public Tag ( ) : string
return string

Verify() public method

Unpack that the public key parameters match the UDF fingerprint.
public Verify ( ) : bool
return bool

Verify() public method

Verify the keypair parameters match the fingerprint.
public Verify ( string TestUDF ) : bool
TestUDF string The fingerprint value.
return bool

Property Details

_KeyPair protected_oe property

The cryptolib representation of the Key Pair. This is the point of access for all cryptolib operations.
protected KeyPair,Goedel.Cryptography _KeyPair
return Goedel.Cryptography.KeyPair