getSharedSecret method

Uint8List getSharedSecret(
  1. PublicKey publicKey, [
  2. bool isCompressed = true
])

Generates Shared Secret

Implementation

Uint8List getSharedSecret(PublicKey publicKey, [bool isCompressed = true]) {
  // ECDH
  return Point.fromBytes(publicKey.bytes)
      .mul(_privateKey)
      .toRawBytes(isCompressed);
}