• API Reference
  • API Reference
  • Noise
  • KeyPair
Show / Hide Table of Contents
  • Noise
    • CipherFunction
    • DhFunction
    • HandshakePattern
    • HandshakeState
    • HashFunction
    • KeyPair
    • MessagePattern
    • PatternModifiers
    • PreMessagePattern
    • Protocol
    • ProtocolConfig
    • Token
    • Transport

Class KeyPair

A Diffie-Hellman private/public key pair.

Inheritance
System.Object
KeyPair
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Noise
Assembly: Noise.dll
Syntax
public sealed class KeyPair : IDisposable

Properties

| Improve this Doc View Source

PrivateKey

Gets the private key.

Declaration
public byte[] PrivateKey { get; }
Property Value
Type Description
System.Byte[]
Exceptions
Type Condition
System.ObjectDisposedException

Thrown if the current instance has already been disposed.

| Improve this Doc View Source

PublicKey

Gets the public key.

Declaration
public byte[] PublicKey { get; }
Property Value
Type Description
System.Byte[]
Exceptions
Type Condition
System.ObjectDisposedException

Thrown if the current instance has already been disposed.

Methods

| Improve this Doc View Source

Dispose()

Erases the key pair from the memory.

Declaration
public void Dispose()
| Improve this Doc View Source

Generate()

Generates a new Diffie-Hellman key pair.

Declaration
public static KeyPair Generate()
Returns
Type Description
KeyPair

A randomly generated private key and its corresponding public key.

Implements

System.IDisposable
  • Improve this Doc
  • View Source
In This Article
  • Properties
    • PrivateKey
    • PublicKey
  • Methods
    • Dispose()
    • Generate()
  • Implements
Back to top Generated by DocFX