Class Signature
A wrapper for a cryptographic signature.
Inheritance
System.Object
Signature
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
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
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
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
GetBytes()
Returns the bytes of the signature, including the Key algorithm as the first byte.
Declaration
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 |
|