Class OdinCrypto
Wrapper class of OdinNative.Wrapper.Crypto for Unity.
This convenient class provides predefined encryption helper functions for Unity. If Peers do not have the same cipher they can not communicate with each other besides some events.
Assembly: cs.temp.dll.dll
Declaration
Fields
InitialPassword
Initial cipher value
Declaration
Methods
GetCryptoCipher()
Get handle to cipher
Declaration
Returns
Odin.OdinCipherHandle
: Handle or null### ChangePassword(string)
Set a password for encryption. Peers with the same password can hear each other.
null == unencrypted
Declaration
Returns
System.Boolean
: false on failure
Parameters
Type | Name | Description |
---|---|---|
System.String | password | chipher password |
GetPeerStatus(int)
Get the encryption status of peer
Declaration
Returns
System.Boolean
: true if encrypted or false
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | peerId | peer id to check |