ECDSASignature.fromBytes constructor
ECDSASignature.fromBytes(
- List<
int> bytes, - ProjectiveECCPoint generator
Implementation
factory ECDSASignature.fromBytes(
List<int> bytes, ProjectiveECCPoint generator) {
if (bytes.length != generator.curve.baselen * 2) {
throw ArgumentException(
"incorrect signatureBytes length ${bytes.length}");
}
final r = BigintUtils.fromBytes(bytes.sublist(0, generator.curve.baselen));
final s = BigintUtils.fromBytes(
bytes.sublist(generator.curve.baselen, generator.curve.baselen * 2));
return ECDSASignature(r, s);
}