signHashBytes static method

String signHashBytes({
  1. required Uint8List hash,
  2. required String privateKey,
})

Sigsn the hash bytes with the private key

Implementation

static String signHashBytes({
  required Uint8List hash,
  required String privateKey,
}) {
  final SigningKey signingKey = SigningKey.fromSeed(
    HEX.decode(privateKey).toUint8List(),
  );
  var sign = signingKey.sign(hash);
  return HEX.encode(sign.signature);
}