publicKeyFromPrivate function

Uint8List publicKeyFromPrivate(
  1. Uint8List privateKey,
  2. {bool compress = true}
)

Implementation

Uint8List publicKeyFromPrivate(Uint8List privateKey, {bool compress = true}) {
  var privateKeyNum = bytesToInt(privateKey);
  var p = ECCurve_secp256k1().G * privateKeyNum;
  return p.getEncoded(compress).sublist(0);
}