C# Class TSystems.RELOAD.Topology.Signature

This class represents the Signature struct. See RELOAD base -13 p. 52
ファイルを表示 Open project: RELOAD-NET/RELOAD.NET

Public Methods

Method Description
Dump ( BinaryWriter writer ) : UInt32
FromReader ( BinaryReader reader, long reload_msg_size ) : Signature
Signature ( ReloadConfig config ) : System

Use this contructor to obtain signature from bytes.

Signature ( ResourceId resId, UInt32 kind, System.UInt64 storageTime, StoredDataValue value, SignerIdentity signerIdentity, ReloadConfig config ) : System

Each StoredData element is individually signed. However, the signature also must be self-contained and cover the Kind-ID and Resource-ID even though they are not present in the StoredData structure. The input to the signature algorithm is: resource_id || kind || storage_time || StoredDataValue || SignerIdentity

Signature ( UInt32 overlay, string transactionId, byte messageContents, SignerIdentity signerIdentity, ReloadConfig config ) : System
Signature ( UInt32 overlay, string transactionId, string messageContents, SignerIdentity signerIdentity, ReloadConfig config ) : System

For signatures over messages the input to the signature is computed over the overlay and transaction_id come from the forwarding header see RELOAD base -13 p.53

Private Methods

Method Description
GetKeyFile ( ) : byte[]

Obtains the private key file.

Sign ( byte bSignInput ) : byte[]

Creates the signature using RSA over a SHA256. Uses the private key from file.

Sign ( string signaturInput ) : byte[]

Creates the signature using RSA over a SHA256. Uses the private key from file.

Method Details

Dump() public method

public Dump ( BinaryWriter writer ) : UInt32
writer System.IO.BinaryWriter
return System.UInt32

FromReader() public method

public FromReader ( BinaryReader reader, long reload_msg_size ) : Signature
reader System.IO.BinaryReader
reload_msg_size long
return Signature

Signature() public method

Use this contructor to obtain signature from bytes.
public Signature ( ReloadConfig config ) : System
config ReloadConfig The stack configuration
return System

Signature() public method

Each StoredData element is individually signed. However, the signature also must be self-contained and cover the Kind-ID and Resource-ID even though they are not present in the StoredData structure. The input to the signature algorithm is: resource_id || kind || storage_time || StoredDataValue || SignerIdentity
public Signature ( ResourceId resId, UInt32 kind, System.UInt64 storageTime, StoredDataValue value, SignerIdentity signerIdentity, ReloadConfig config ) : System
resId TSystems.RELOAD.Utils.ResourceId
kind System.UInt32
storageTime System.UInt64
value TSystems.RELOAD.Storage.StoredDataValue
signerIdentity SignerIdentity
config ReloadConfig
return System

Signature() public method

public Signature ( UInt32 overlay, string transactionId, byte messageContents, SignerIdentity signerIdentity, ReloadConfig config ) : System
overlay System.UInt32
transactionId string
messageContents byte
signerIdentity SignerIdentity
config ReloadConfig
return System

Signature() public method

For signatures over messages the input to the signature is computed over the overlay and transaction_id come from the forwarding header see RELOAD base -13 p.53
public Signature ( UInt32 overlay, string transactionId, string messageContents, SignerIdentity signerIdentity, ReloadConfig config ) : System
overlay System.UInt32 overlay
transactionId string
messageContents string Message Contents
signerIdentity SignerIdentity SignerIdentity
config ReloadConfig
return System