PrivateKey.fromBytes constructor

PrivateKey.fromBytes(
  1. Curve curve,
  2. List<int> bytes
)

Implementation

PrivateKey.fromBytes(this.curve, List<int> bytes) {
  var byteLen = (curve.bitSize + 7) >> 3;
  D = BigInt.parse(
      List<String>.generate(
          byteLen, (i) => bytes[i].toRadixString(16).padLeft(2, '0')).join(),
      radix: 16);
}