XChaCha20-Poly1305 encryption for Discord voice.
Uses the salchicha library (pure Elixir, no NIF). Implements the
aead_xchacha20_poly1305_rtpsize mode.
Summary
Functions
Decrypts an XChaCha20-Poly1305 encrypted voice packet.
Encrypts an audio frame using XChaCha20-Poly1305.
Returns the nonce byte length for this encryption mode.
Functions
Decrypts an XChaCha20-Poly1305 encrypted voice packet.
Returns {:ok, plaintext} or :error.
Encrypts an audio frame using XChaCha20-Poly1305.
The RTP header (first 12 bytes) is used as AAD and stays plaintext. A 4-byte nonce is appended to the packet.
Returns the nonce byte length for this encryption mode.