Interface ICryptoExchanger
Defines methods used for a key exchange that is able to derive a shared encryptor.
Namespace: SuperNet.Netcode.Crypto
Assembly: cs.temp.dll.dll
Syntax
public interface ICryptoExchanger : IDisposable
Properties
KeyLength
Size of exchange key in bytes.
Declaration
int KeyLength { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
DeriveEncryptor(ArraySegment<Byte>)
Generate a shared encryptor.
Declaration
ICryptoEncryptor DeriveEncryptor(ArraySegment<byte> remoteKey)
Parameters
Type | Name | Description |
---|---|---|
ArraySegment<System.Byte> | remoteKey | Received remote exchange key. |
Returns
Type | Description |
---|---|
ICryptoEncryptor | Shared encryptor that is guaranteed to be the same on both peers. |
ExportKey(ArraySegment<Byte>)
Copy exchange key to the output.
Declaration
void ExportKey(ArraySegment<byte> output)
Parameters
Type | Name | Description |
---|---|---|
ArraySegment<System.Byte> | output | Output to write to. |