computeSharedSecret static method

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

Computes the shared secret of Alice and Bob based on two Hexadecimal Strings

Implementation

static BigInt computeSharedSecret(String privateKeyHex, String publicKeyHex) {
  return M511
      .multiply(parsePublicKey(publicKeyHex), parsePrivateKey(privateKeyHex))
      .x;
}