示例#1
0
 /// <summary>
 ///  ImportParameters will replace the existing key that ECDsaCng is working with by creating a
 ///  new CngKey. If the parameters contains only Q, then only a public key will be imported.
 ///  If the parameters also contains D, then a full key pair will be imported.
 ///  The parameters Curve value specifies the type of the curve to import.
 /// </summary>
 /// <exception cref="CryptographicException">
 ///  if <paramref name="parameters" /> does not contain valid values.
 /// </exception>
 /// <exception cref="NotSupportedException">
 ///  if <paramref name="parameters" /> references a curve that cannot be imported.
 /// </exception>
 /// <exception cref="PlatformNotSupportedException">
 ///  if <paramref name="parameters" /> references a curve that is not supported by this platform.
 /// </exception>
 public override void ImportParameters(ECParameters parameters)
 {
     Key = ECCng.ImportECDsaParameters(ref parameters);
 }