Nostrum.Voice.Crypto (nostrum v0.11.0-dev)
View SourceInternal module that handles voice data encryption and decryption
Based on the selected voice encryption mode, different ciphers may be used
Summary
Types
@type cipher() :: cipher_non_rtpsize() | cipher_alias() | cipher_rtpsize()
@type cipher_alias() :: :aes256_gcm | :xchacha20_poly1305
@type cipher_non_rtpsize() ::
:xsalsa20_poly1305
| :xsalsa20_poly1305_suffix
| :xsalsa20_poly1305_lite
| :aead_aes256_gcm
@type cipher_rtpsize() ::
:xsalsa20_poly1305_lite_rtpsize
| :aead_xchacha20_poly1305_rtpsize
| :aead_aes256_gcm_rtpsize
Functions
@spec encryption_mode(Nostrum.Bot.bot_options(), [String.t()]) :: cipher()