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 SourcePrivateKey
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. |
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 SourceDispose()
Erases the key pair from the memory.
Declaration
public void Dispose()
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