Casper.Network.SDK
Show / Hide Table of Contents

Class Signature

A wrapper for a cryptographic signature.

Inheritance
System.Object
Signature
Namespace: Casper.Network.SDK.Types
Assembly: Casper.Network.SDK.dll
Syntax
public class Signature : object

Constructors

Signature(Byte[], KeyAlgo)

Declaration
protected Signature(byte[] rawBytes, KeyAlgo keyAlgo)
Parameters
Type Name Description
System.Byte[] rawBytes
KeyAlgo keyAlgo

Properties

KeyAlgorithm

Declaration
public KeyAlgo KeyAlgorithm { get; }
Property Value
Type Description
KeyAlgo

RawBytes

Byte array without the Key algorithm identifier.

Declaration
public byte[] RawBytes { get; }
Property Value
Type Description
System.Byte[]

Methods

FromBytes(Byte[])

Creates a PublicKey object from a byte array (containing the Key algorithm identifier).

Declaration
public static Signature FromBytes(byte[] bytes)
Parameters
Type Name Description
System.Byte[] bytes
Returns
Type Description
Signature

FromHexString(String)

Creates a Signature object from an hexadecimal string (containing the Key algorithm identifier).

Declaration
public static Signature FromHexString(string signature)
Parameters
Type Name Description
System.String signature
Returns
Type Description
Signature

FromRawBytes(Byte[], KeyAlgo)

Creates a Signature object from a byte array and the key algorithm identifier.

Declaration
public static Signature FromRawBytes(byte[] rawBytes, KeyAlgo keyAlgo)
Parameters
Type Name Description
System.Byte[] rawBytes
KeyAlgo keyAlgo
Returns
Type Description
Signature

GetBytes()

Returns the bytes of the signature, including the Key algorithm as the first byte.

Declaration
public byte[] GetBytes()
Returns
Type Description
System.Byte[]

ToHexString()

Returns the signature as an hexadecimal string, including the key algorithm in the first position.

Declaration
public string ToHexString()
Returns
Type Description
System.String

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
In This Article
Back to top Maintained by MAKE Technology LLC