ImportParameters() public method

When overridden in a derived class, imports the specified ECParameters.
public ImportParameters ( System.Security.Cryptography.ECParameters parameters ) : void
parameters System.Security.Cryptography.ECParameters The curve parameters.
return void
        /// <summary>
        /// Creates an instance of the platform specific implementation of the cref="ECDsa" algorithm.
        /// </summary>
        /// <param name="parameters">
        /// The <see cref="ECParameters"/> representing the elliptic curve parameters.
        /// </param>
        public static ECDsa Create(ECParameters parameters)
        {
            ECDsa ecdsa = Create();

            ecdsa.ImportParameters(parameters);
            return(ecdsa);
        }
Beispiel #2
0
        /// <summary>
        /// Creates a new instance of the default implementation of the Elliptic Curve Digital Signature Algorithm
        /// (ECDSA) 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 ECDsa Create(ECParameters parameters)
        {
            ECDsa ecdsa = Create();

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

            return(ecdsa);
        }
Beispiel #3
0
 public override void ImportParameters(ECParameters parameters) =>
 _wrapped.ImportParameters(parameters);