Class Crypto
Optional, pluggable encryption module for room communications. A Crypto object can be attached to an ODIN room on creation to enable customizable, end-to-end encryption (E2EE). When enabled, it intercepts data right before transmission and immediately after reception, allowing custom processing of datagrams, messages and custom peer user data.
Implements:
System.IDisposable
Properties
Handle
Cipher handle
Methods
Create(OdinCipherHandle)
Create Crypto with OdinCipherHandle from Odin.Crypto.Methods
Returns
OdinNative.Wrapper.Crypto: Crypto wrapper
Parameters
| Type | Name | Description |
|---|---|---|
| OdinNative.Core.Imports.OdinCipherHandle | handle | native OdinCipherHandle |
Create()
Create Crypto with a new OdinCipherHandle
Returns
OdinNative.Wrapper.Crypto: new Crypto wrapper
Create(string)
Create Crypto with a new OdinCipherHandle and set password
Returns
OdinNative.Wrapper.Crypto: new Crypto wrapper
Parameters
| Type | Name | Description |
|---|---|---|
System.String | password | cipher password |
CryptoCreate()
Returns
OdinNative.Core.Imports.OdinCipherHandle
CryptoGetPeerStatus(int)
Get peer status of unencrypted/encrypted
Returns
OdinNative.Core.Imports.NativeBindings.OdinCryptoPeerStatus: encryption status of peer
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | peerId | peer to check |
CryptoSetPassword(string)
Set Cipher password for native crypto
Returns
System.Boolean: true on success, otherwise false
Parameters
| Type | Name | Description |
|---|---|---|
System.String | password | cipher password |
Dispose()
Cleanup OdinCipherHandle
Implements
System.IDisposable