C# Класс Goedel.Mesh.PublicKey

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_KeyPair Goedel.Cryptography.KeyPair

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
GetKeyPair ( ) : KeyPair

Описание методов

DeserializeToken() публичный метод

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
Результат void

ExportPrivateParameters() публичный метод

Create a Private Parameters property that contains the private parameters of the key.
public ExportPrivateParameters ( ) : void
Результат void

From() публичный статический метод

Create a new instance from untagged byte input. i.e. {... data ... }
public static From ( byte _Data ) : PublicKey
_Data byte The input data.
Результат PublicKey

From() публичный статический метод

Create a new instance from untagged string input. i.e. {... data ... }
public static From ( string _Input ) : PublicKey
_Input string The input data.
Результат PublicKey

FromTagged() публичный статический метод

Deserialize a tagged stream
public static FromTagged ( JSONReader JSONReader ) : PublicKey
JSONReader JSONReader The input stream
Результат PublicKey

FromTagged() публичный статический метод

Create a new instance from tagged byte input. i.e. { "PublicKey" : {... data ... } }
public static FromTagged ( byte _Data ) : PublicKey
_Data byte The input data.
Результат PublicKey

FromTagged() публичный статический метод

Create a new instance from tagged string input. i.e. { "PublicKey" : {... data ... } }
public static FromTagged ( string _Input ) : PublicKey
_Input string The input data.
Результат PublicKey

Generate() публичный статический метод

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.
Результат PublicKey

GetKeySecurity() публичный статический метод

Return the initial key security level for a key type
public static GetKeySecurity ( KeyType KeyType ) : KeySecurity
KeyType KeyType Type of key
Результат KeySecurity

ImportPrivateParameters() публичный метод

Create a provider object that includes the private key parameters and add this to the certificate.
public ImportPrivateParameters ( ) : void
Результат void

PublicKey() публичный метод

Default Constructor
public PublicKey ( ) : System
Результат System

PublicKey() публичный метод

Initialize class from JSONReader stream.
public PublicKey ( JSONReader JSONReader ) : System
JSONReader JSONReader Input stream
Результат System

PublicKey() публичный метод

Initialize class from a JSON encoded class.
public PublicKey ( string _String ) : System
_String string Input string
Результат System

SelfSignCertificate() публичный метод

Create a self signed root certificate
public SelfSignCertificate ( Application PKIXUse ) : void
PKIXUse Application Bit mask specifying certificate uses.
Результат void

Serialize() публичный метод

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.
Результат void

SerializeX() публичный метод

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.
Результат void

SignCertificate() публичный метод

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).
Результат void

SignCertificate() публичный метод

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).
Результат void

Tag() публичный метод

Tag identifying this class.
public Tag ( ) : string
Результат string

Verify() публичный метод

Unpack that the public key parameters match the UDF fingerprint.
public Verify ( ) : bool
Результат bool

Verify() публичный метод

Verify the keypair parameters match the fingerprint.
public Verify ( string TestUDF ) : bool
TestUDF string The fingerprint value.
Результат bool

Описание свойств

_KeyPair защищенное свойство

The cryptolib representation of the Key Pair. This is the point of access for all cryptolib operations.
protected KeyPair,Goedel.Cryptography _KeyPair
Результат Goedel.Cryptography.KeyPair