sign static method

Uint8List sign(
  1. KeyPair keyPair,
  2. Uint8List payload
)

Signs the payload with the keypair.

If the payload is greater than 256 bytes, it will be hashed with blake2b256 before signing.

Implementation

static Uint8List sign(KeyPair keyPair, Uint8List payload) {
  if (payload.length > 256) {
    payload = Hasher.blake2b256.hash(payload);
  }
  return keyPair.sign(payload);
}