コード例 #1
0
        /// <summary>
        /// Creates a new instance of the default implementation of the Elliptic Curve Diffie-Hellman Algorithm
        /// (ECDH) using the specified ECParameters as the key.
        /// </summary>
        /// <param name="parameters">The parameters representing the key to use.</param>
        /// <returns>A new instance of the default implementation of this class.</returns>
        public static ECDiffieHellman Create(ECParameters parameters)
        {
            ECDiffieHellman ecdh = Create();

            if (ecdh != null)
            {
                try {
                    ecdh.ImportParameters(parameters);
                }
                catch {
                    ecdh.Dispose();
                    throw;
                }
            }

            return(ecdh);
        }
コード例 #2
0
 public override void ImportParameters(ECParameters parameters) =>
 _wrapped.ImportParameters(parameters);