Nostrum.Voice.Crypto (nostrum v0.11.0-dev)

View Source

Internal module that handles voice data encryption and decryption

Based on the selected voice encryption mode, different ciphers may be used

Summary

Types

cipher()

@type cipher() :: cipher_non_rtpsize() | cipher_alias() | cipher_rtpsize()

cipher_alias()

@type cipher_alias() :: :aes256_gcm | :xchacha20_poly1305

cipher_non_rtpsize()

@type cipher_non_rtpsize() ::
  :xsalsa20_poly1305
  | :xsalsa20_poly1305_suffix
  | :xsalsa20_poly1305_lite
  | :aead_aes256_gcm

cipher_rtpsize()

@type cipher_rtpsize() ::
  :xsalsa20_poly1305_lite_rtpsize
  | :aead_xchacha20_poly1305_rtpsize
  | :aead_aes256_gcm_rtpsize

Functions

encryption_mode(bot_options, available_modes)

@spec encryption_mode(Nostrum.Bot.bot_options(), [String.t()]) :: cipher()