Skip to main content
Version: 2.x

Class Crypto

General native cypto cipher

Assembly: cs.temp.dll.dll
Declaration
public class Crypto : IDisposable

Properties

Handle

Cipher handle

Declaration
public OdinCipherHandle Handle { get; }

Methods

Create(OdinCipherHandle)

Create Crypto with OdinCipherHandle from Odin.Crypto.Methods

Declaration
public static Crypto Create(OdinCipherHandle handle)
Returns

OdinNative.Wrapper.Crypto: Crypto wrapper

Parameters
TypeNameDescription
Odin.OdinCipherHandlehandlenative OdinCipherHandle

Create()

Create Crypto with a new OdinCipherHandle

Declaration
public static Crypto Create()
Returns

OdinNative.Wrapper.Crypto: new Crypto wrapper### Create(string) Create Crypto with a new OdinCipherHandle and set password

Declaration
public static Crypto Create(string password)
Returns

OdinNative.Wrapper.Crypto: new Crypto wrapper

Parameters
TypeNameDescription
System.Stringpasswordcipher password

CryptoCreate()

Declaration
protected static OdinCipherHandle CryptoCreate()
Returns

Odin.OdinCipherHandle

CryptoGetPeerStatus(int)

Get peer status of unencrypted/encrypted

Declaration
public virtual OdinCryptoPeerStatus CryptoGetPeerStatus(int peerId)
Returns

Odin.OdinCryptoPeerStatus: encryption status of peer

Parameters
TypeNameDescription
System.Int32peerIdpeer to check

CryptoSetPassword(string)

Set Cipher password for native crypto

Declaration
public virtual bool CryptoSetPassword(string password)
Returns

System.Boolean: true on 0 or false

Parameters
TypeNameDescription
System.Stringpasswordcipher password

Dispose()

Cleanup OdinCipherHandle

Declaration
public void Dispose()