rawSecret static method

ECPoint rawSecret(
  1. String privateString,
  2. String publicString
)

return a ECPoint data secret

Implementation

static ECPoint rawSecret(String privateString, String publicString) {
  final privateKey = loadPrivateKey(privateString);
  final publicKey = loadPublicKey(publicString);
  assert(privateKey.d != null && publicKey.Q != null);
  final secret = scalarMultiple(
    privateKey.d!,
    publicKey.Q!,
  );
  return secret;
}