SignatureData.fromBytes constructor

SignatureData.fromBytes(
  1. Uint8List data
)

Implementation

factory SignatureData.fromBytes(Uint8List data) {
  if (data.length != 64) {
    throw ArgumentError("Invalid bytes length ${data.length}");
  }

  final r = decodeBigIntToUnsigned(data.sublist(0, 32));
  final s = decodeBigIntToUnsigned(data.sublist(32, 64));
  return SignatureData(r, s);
}