Table of Contents
API reference

Enum SodiumEncryptionMode

Namespace
DisCatSharp.Voice.Enums.Interop
Assembly
DisCatSharp.Voice.dll

Specifies an encryption mode to use with Sodium.

public enum SodiumEncryptionMode

Fields

AeadAes256GcmRtpSize = 0

AES-256-GCM AEAD mode with RTP-size framing. The 4-byte LE nonce counter followed by the 16-byte auth tag are appended to the payload. This is the preferred mode when offered by Discord.

AeadXChaCha20Poly1305RtpSize = 1

XChaCha20-Poly1305 AEAD mode with RTP-size framing. The 4-byte LE nonce counter followed by the 16-byte auth tag are appended to the payload. Required fallback when AES-256-GCM is not offered.

XSalsa20Poly1305Lite = 2

The nonce is an incrementing uint32 value. It is encoded as big endian value at the beginning of the nonce buffer. The 4 bytes are also appended at the end of the packet.

XSalsa20Poly1305Suffix = 3

The nonce consists of random bytes. It is appended at the end of a packet.

XSalsa20Poly1305 = 4

The nonce consists of the RTP header. Nothing is appended to the packet.