signProsonalMessage method

List<int> signProsonalMessage(
  1. List<int> digest, {
  2. int? payloadLength,
})

Implementation

List<int> signProsonalMessage(List<int> digest, {int? payloadLength}) {
  final prefix = ETHSignerConst.ethPersonalSignPrefix +
      (payloadLength?.toString() ?? digest.length.toString());
  final prefixBytes = StringUtils.encode(prefix, type: StringEncoding.ascii);
  final sign = _signEcdsa(<int>[...prefixBytes, ...digest]);
  return sign.toBytes(true);
}