personalECRecoverToUint8List static method

Uint8List personalECRecoverToUint8List(
  1. Uint8List payload,
  2. String signHex
)

Implementation

static Uint8List personalECRecoverToUint8List(
    Uint8List payload, String signHex) {
  final prefix = _messagePrefix + payload.length.toString();
  final prefixBytes = ascii.encode(prefix);

  // will be a Uint8List, see the documentation of Uint8List.+
  final concat = uint8ListFromList(prefixBytes + payload);

  return ecRecover(keccak256(concat), MsgSignature.fromSignHex(signHex));
}