Initializes a new instance of the ECDiffieHellmanCng class by using the specified CngKey object.
The key that will be used as input to the cryptographic operations performed by the current object.
key is nullptr.
key does not specify an Elliptic Curve Diffie-Hellman (ECDH) algorithm group.
Cryptography Next Generation (CNG) classes are not supported on this system.