3 // Copyright (c) Microsoft Corporation. All rights reserved.
9 namespace System.Security.Cryptography {
11 /// Base class for implementations of elliptic curve DSA
13 [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
14 public abstract class ECDsa : AsymmetricAlgorithm {
15 public override string KeyExchangeAlgorithm {
19 public override string SignatureAlgorithm {
20 get { return "ECDsa"; }
24 // Creation factory methods
27 public static new ECDsa Create() {
29 throw new NotImplementedException ();
31 return Create(typeof(ECDsaCng).FullName);
35 public static new ECDsa Create(string algorithm) {
36 if (algorithm == null) {
37 throw new ArgumentNullException("algorithm");
40 return CryptoConfig.CreateFromName(algorithm) as ECDsa;
44 // Signature operations
47 public abstract byte[] SignHash(byte[] hash);
48 public abstract bool VerifyHash(byte[] hash, byte[] signature);