ECDsaSignature
Namespace: Babel.Licensing Assembly: Babel.Licensing.dll
Creates and verifies digital signature using the Elliptic Curve Digital Signature Algorithm (ECDSA). This class cannot be inherited.
Inheritance
Implements
ISignatureProvider, ILicenseSerializable, ISignatureWriter, ISignatureKeyInfo
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Examples
Constructors
ECDsaSignature()
Create a new instance of class.
Examples
ECDsaSignature(ECDsaKeySize)
Create a new instance of class with the given .
Parameters
Name | Description |
---|---|
| A value indicating the bit size of the key. |
Examples
Properties
AlgorithmName
Gets the name of the sign algorithm.
Property Value
GenerateKeyInfo
Gets or sets a value indicating whether the generate key information.
Property Value
HasKeySize
Gets a value indicating whether this object has key size.
Property Value
HasPrivateKey
Gets a value indicating whether this object has private key.
Property Value
HasPublicKey
Gets a value indicating whether this object has public key.
Property Value
KeySize
Gets ECDSA algorithm key size.
Property Value
PrivateKey
Gets the private key as an encoded Base32 string.
Property Value
PublicKey
Gets the public key as an encoded Base32 string.
Property Value
Methods
CreateKeyPair()
Creates a new key pair.
See Also
ExportKeys(bool)
Export ECDsa keys as base 64 encoded string.
Parameters
Name | Description |
---|---|
| Whether to write only public key data. |
Returns
Name | Description |
---|---|
The base 64 encoded ECDsa key. |
FromKeys(string, string)
Creates an object from the given public and private keys.
Parameters
Name | Description |
---|---|
| The public key Base32 encoded string. |
| An optional private key Base32 encoded string. |
Returns
Name | Description |
---|---|
The ECDsaSignature with the given keys. |
Exceptions
Name | Description |
---|---|
Thrown when one or more required arguments are null. |
See Also
ImportKeys(string)
Import ECDsa keys.
Parameters
Name | Description |
---|---|
| The base64 encoded string ECDsa key. |
Exceptions
Name | Description |
---|---|
Thrown when one or more required arguments are null. | |
Thrown when the requested operation is invalid. |
SignData(byte[])
Generate the signature for the given data.
Parameters
Name | Description |
---|---|
| The data to sign. |
Returns
Name | Description |
---|---|
byte[] | Returns the generated signature. |
See Also
VerifyData(byte[], byte[])
Verify data.
Parameters
Returns
Name | Description |
---|---|
|
See Also
WritePem(string, bool)
Writes the signature using PEM format to the specified file.
Parameters
Exceptions
Name | Description |
---|---|
Thrown when one or more required arguments are null. | |
Thrown when one or more arguments have unsupported or illegal values. |
WritePem(Stream, bool)
Writes the signature using PEM format to the specified stream.
Parameters
Name | Description |
---|---|
| The stream to write. |
| Whether to write only public key data. |
Exceptions
Name | Description |
---|---|
Thrown when one or more required arguments are null. |
See Also
Last updated