SchnorrSignature class

Constructors

SchnorrSignature.new(Uint8List data)
Takes a 64-byte serialized Schnorr signature as data that contains 32-byte r and s values. The r and s values are not checked for validity. If they are invalid then verify will always fail.
SchnorrSignature.fromHex(String hex)
Takes a HEX encoded 64-byte schnorr signature.
SchnorrSignature.sign(ECPrivateKey privkey, Uint8List hash)
Creates a signature using a private key (privkey) for a given 32-byte hash. The signature will be generated deterministically and shall be the same for a given hash and key. InvalidSchnorrSignature is thrown if the resulting signature is invalid. This shouldn't happen unless there is a computation error.
factory

Properties

data Uint8List
The serialized 32 byte r and s values of a schnorr signature
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
verify(ECPublicKey publickey, Uint8List hash) bool
Takes a 32-byte message hash and publickey and returns true if the signature is valid for the public key and hash.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

length → const int