encodeECPrivateKeyToRaw function

Uint8List encodeECPrivateKeyToRaw(
  1. ECPrivateKey privateKey
)

Implementation

Uint8List encodeECPrivateKeyToRaw(ECPrivateKey privateKey) {
  final dBytes = bigIntToUint8List(privateKey.d!);

  final paddedD = Uint8List(32);
  paddedD.setRange(32 - dBytes.length, 32, dBytes);
  return paddedD;
}