signPersonalMessageToUint8List static method

Uint8List signPersonalMessageToUint8List(
  1. Uint8List payload,
  2. Uint8List privateKey
)

Implementation

static Uint8List signPersonalMessageToUint8List(
    Uint8List payload, Uint8List privateKey) {
  final prefix = _messagePrefix + payload.length.toString();
  final prefixBytes = ascii.encode(prefix);

  final concat = uint8ListFromList(prefixBytes + payload);

  final signature = Signature.createSignature(concat, privateKey);
  return signature.bytes;
}