Class EcdsaKey
An elliptic-curve key.
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class EcdsaKey : AsymmetricKey
Properties
NamedCurve
Gets or sets the named curve.
Declaration
public EcdsaNamedCurve NamedCurve { get; set; }
Property Value
Type | Description |
---|---|
Ecdsa |
PrivateKey
Gets or sets the private key.
Declaration
public byte[] PrivateKey { get; set; }
Property Value
Type | Description |
---|---|
System. |
PublicKey
Gets or sets the public key.
Declaration
public byte[] PublicKey { get; set; }
Property Value
Type | Description |
---|---|
System. |
Size
Gets the size of the key.
Declaration
public int Size { get; }
Property Value
Type | Description |
---|---|
System. |
Type
Gets the key type.
Declaration
public override AsymmetricKeyType Type { get; }
Property Value
Type | Description |
---|---|
Asymmetric |
Overrides
Methods
GetBytes()
Serializes this key to binary.
Declaration
public byte[] GetBytes()
Returns
Type | Description |
---|---|
System. |
GetString()
Serializes this key to a string.
Declaration
public string GetString()
Returns
Type | Description |
---|---|
System. |
HasPrivate()
Returns true
if the key contains
private information.
Declaration
public override bool HasPrivate()
Returns
Type | Description |
---|---|
System. |
Overrides
HasPublic()
Returns true
if the key contains
public information.
Declaration
public override bool HasPublic()
Returns
Type | Description |
---|---|
System. |
Overrides
ParseBuffer(DataBuffer, Boolean)
Deserializes a key from binary.
Declaration
public static EcdsaKey ParseBuffer(DataBuffer buffer, bool isPrivate)
Parameters
Type | Name | Description |
---|---|---|
Data |
buffer | The buffer. |
System. |
isPrivate | Whether this is a public key. |
Returns
Type | Description |
---|---|
Ecdsa |
ParseBytes(Byte[], Boolean)
Deserializes a key from binary.
Declaration
public static EcdsaKey ParseBytes(byte[] bytes, bool isPrivate)
Parameters
Type | Name | Description |
---|---|---|
System. |
bytes | The bytes. |
System. |
isPrivate | Whether this is a public key. |
Returns
Type | Description |
---|---|
Ecdsa |
ParseSignature(Byte[], out Byte[], out Byte[])
Parses a signature.
Declaration
public static bool ParseSignature(byte[] signature, out byte[] r, out byte[] s)
Parameters
Type | Name | Description |
---|---|---|
System. |
signature | The signature. |
System. |
r | The R value. |
System. |
s | The S value. |
Returns
Type | Description |
---|---|
System. |
ParseString(String)
Deserializes a key from a string.
Declaration
public static EcdsaKey ParseString(string str)
Parameters
Type | Name | Description |
---|---|---|
System. |
str | The string. |
Returns
Type | Description |
---|---|
Ecdsa |
ToPublic()
Creates a copy of this key without the private key.
Declaration
public EcdsaKey ToPublic()
Returns
Type | Description |
---|---|
Ecdsa |