Click or drag to resize
ECDsaSignature Class
Creates and verifies digital signature using the Elliptic Curve Digital Signature Algorithm (ECDSA). This class cannot be inherited.
Inheritance Hierarchy

Namespace:  Babel.Licensing
Assemblies:   Babel.Licensing (in Babel.Licensing.dll) Version:
  Babel.Licensing (in Babel.Licensing.dll) Version:
public sealed class ECDsaSignature : ISignatureProvider, 
	ILicenseSerializable, ISignatureWriter, ISignatureKeyInfo

The ECDsaSignature type exposes the following members.

Public methodCode exampleECDsaSignature
Create a new instance of ECDsaSignature class.
Public methodCode exampleECDsaSignature(ECDsaKeySize)
Create a new instance of ECDsaSignature class with the given ECDsaKeySize.
Public propertyAlgorithmName
Gets the name of the sign algorithm.
Public propertyGenerateKeyInfo
Gets or sets a value indicating whether the generate key information.
Public propertyKeySize
Gets ECDSA algorithm key size.
Public propertyPrivateKey
Gets the private key as an encoded Base32 string.
Public propertyPublicKey
Gets the public key as an encoded Base32 string.
Public methodCreateKeyPair
Creates a new key pair.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodStatic memberFromKeys
Creates an ECDsaSignature object from the given public and private keys.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSignData
Generate the signature for the given data.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodVerifyData
Verify data.
Public methodWritePem(Stream, Boolean)
Writes the signature using PEM format to the specified stream.
Public methodWritePem(String, Boolean)
Writes the signature using PEM format to the specified file.
// Sign data
ECDsaSignature signer = new ECDsaSignature();

// A private key is needed to sign data

byte[] data = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
byte[] signature = signer.SignData(data);

// To verify that the signature data we need only the public key
ECDsaSignature verifier = ECDsaSignature.FromKeys(signer.PublicKey);

// Returns true
bool result = verifier.VerifyData(data, signature);
See Also