Class Ed25519SignKey
- Namespace
- Concordium.Sdk.Crypto
- Assembly
- Concordium.Sdk.dll
Represents a (secret) sign key of an ed25519 keypair.
Used for signing transactions.
Equality are by comparing elements of underlying byte array.
public sealed record Ed25519SignKey : ISigner, IEquatable<Ed25519SignKey>
- Inheritance
-
Ed25519SignKey
- Implements
- Inherited Members
Fields
SignKeyBytesLength
The length of an ed25519 (secret) sign key in bytes.
public const int SignKeyBytesLength = 32
Field Value
Methods
Equals(Ed25519SignKey?)
Determines whether one Ed25519SignKey is equal to a second Ed25519SignKey.
public bool Equals(Ed25519SignKey? other)
Parameters
other
Ed25519SignKey
Returns
From(byte[])
Initializes a new instance of the Ed25519SignKey class.
public static Ed25519SignKey From(byte[] signKeyAsBytes)
Parameters
signKeyAsBytes
byte[]A length-32 byte array representing the ed25519 (secret) sign key.
Returns
Exceptions
- ArgumentException
The sign key was not a length-32 byte array.
From(string)
Initializes a new instance of the Ed25519SignKey class.
public static Ed25519SignKey From(string signKeyAsHexString)
Parameters
signKeyAsHexString
stringA length-64 hex encoded string representing the sign key.
Returns
Exceptions
- ArgumentException
The sign key was not a length-64 hex encoded string.
GetHashCode()
Get hash code for the Ed25519SignKey.
public override int GetHashCode()
Returns
Sign(byte[])
Signs the provided data using the ed25519 (secret) sign key.
public byte[] Sign(byte[] bytes)
Parameters
bytes
byte[]A byte array representing the data to sign.
Returns
- byte[]
ToBytes()
Copies the ed25519 (secret) sign to length-32 byte array.
public byte[] ToBytes()
Returns
- byte[]
ToString()
Gets the ed25519 (secret) sign key represented as a length-64 hex encoded string.
public override string ToString()