Casper.Network.SDK
Show / Hide Table of Contents

Class KeyPair

A Private key. Provides signing functionality.

Inheritance
object
KeyPair
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Casper.Network.SDK.Types
Assembly: Casper.Network.SDK.dll
Syntax
public class KeyPair

Properties

| Edit this page View Source

PublicKey

Declaration
public PublicKey PublicKey { get; }
Property Value
Type Description
PublicKey

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
Type Description
KeyPair
| 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
Type Description
KeyPair
| 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
Type Description
byte[]
| 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
  • Edit this page
  • View Source
In this article
Back to top Maintained by MAKE Technology LLC