Exemple #1
0
 /// <summary>
 ///  Exports the key and explicit curve parameters used by the ECC object into an <see cref="ECParameters"/> object.
 /// </summary>
 /// <exception cref="CryptographicException">
 ///  if there was an issue obtaining the curve values.
 /// </exception>
 /// <exception cref="PlatformNotSupportedException">
 ///  if explicit export is not supported by this platform. Windows 10 or higher is required.
 /// </exception>
 /// <returns>The key and explicit curve parameters used by the ECC object.</returns>
 public override ECParameters ExportExplicitParameters(bool includePrivateParameters)
 {
     return(ECCng.ExportExplicitParameters(Key, includePrivateParameters));
 }
Exemple #2
0
 /// <summary>
 ///  Exports the key and explicit curve parameters used by the ECC object into an <see cref="ECParameters"/> object.
 /// </summary>
 /// <exception cref="CryptographicException">
 ///  if there was an issue obtaining the curve values.
 /// </exception>
 /// <exception cref="PlatformNotSupportedException">
 ///  if explicit export is not supported by this platform. Windows 10 or higher is required.
 /// </exception>
 /// <returns>The key and explicit curve parameters used by the ECC object.</returns>
 public override ECParameters ExportExplicitParameters()
 {
     using (CngKey key = Import()) {
         return(ECCng.ExportExplicitParameters(key, includePrivateParameters: false));
     }
 }