computeSharedSecret static method

Uint8List computeSharedSecret(
  1. String privateKeyHex,
  2. String publicKeyHex
)

Implementation

static Uint8List computeSharedSecret(
    String privateKeyHex, String publicKeyHex) {
  final ec = getS256();
  final privateKey = PrivateKey.fromHex(ec, privateKeyHex);
  final publicKey = PublicKey.fromHex(ec, checkPublicKey(publicKeyHex));
  final sec = computeSecret(privateKey, publicKey);
  return Uint8List.fromList(sec);
}