Class KeyPair
A Private key. Provides signing functionality.
Assembly: Casper.Network.SDK.dll
Syntax
Properties
|
Edit this page
View Source
PublicKey
Declaration
public PublicKey PublicKey { get; }
Property Value
Methods
|
Edit this page
View Source
CreateNew(KeyAlgo)
Creates a new key pair with the specified elliptic curve.
Declaration
public static KeyPair CreateNew(KeyAlgo keyAlgorithm)
Parameters
| Type |
Name |
Description |
| KeyAlgo |
keyAlgorithm |
|
Returns
|
Edit this page
View Source
FromPem(string)
Loads a key pair from a PEM file containing a private key.
Declaration
public static KeyPair FromPem(string filePath)
Parameters
| Type |
Name |
Description |
| string |
filePath |
|
Returns
|
Edit this page
View Source
Sign(byte[])
Signs a message and returns the signature.
Declaration
public byte[] Sign(byte[] message)
Parameters
| Type |
Name |
Description |
| byte[] |
message |
|
Returns
|
Edit this page
View Source
WritePublicKeyToPem(string)
Saves the public key to a PEM file.
Declaration
public void WritePublicKeyToPem(string filePath)
Parameters
| Type |
Name |
Description |
| string |
filePath |
|
|
Edit this page
View Source
WriteToPem(string)
Saves the private key to a PEM file.
Declaration
public void WriteToPem(string filePath)
Parameters
| Type |
Name |
Description |
| string |
filePath |
|