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 = 0AES-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 = 1XChaCha20-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 = 2The 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 = 3The nonce consists of random bytes. It is appended at the end of a packet.
XSalsa20Poly1305 = 4The nonce consists of the RTP header. Nothing is appended to the packet.