~.encrypt
Encrypt
Encrypt
Container class for all supported, non-deprecated encryption modes.
SUPPORTED
class-attribute
instance-attribute
A list of all currently supported, non-deprecated, complete, and tested encryption modes.
decrypt_aead_aes256_gcm_rtpsize
staticmethod
decrypt_aead_xchacha20_poly1305_rtpsize
staticmethod
encrypt_aead_aes256_gcm_rtpsize
staticmethod
encrypt_aead_aes256_gcm_rtpsize(
secret_key: bytes,
nonce: int,
header: bytes,
audio: bytes,
) -> bytes
Encrypt audio using aead_aes256_gcm_rtpsize.
| PARAMETER | DESCRIPTION |
|---|---|
secret_key
|
32-byte AES encryption key provided by Discord.
TYPE:
|
nonce
|
32-bit packet counter.
TYPE:
|
header
|
RTP header (12 bytes).
TYPE:
|
audio
|
Opus audio payload.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bytes
|
The encrypted audio packet. |
encrypt_aead_xchacha20_poly1305_rtpsize
staticmethod
encrypt_aead_xchacha20_poly1305_rtpsize(
secret_key: bytes,
nonce: int,
header: bytes,
audio: bytes,
) -> bytes
Encrypt audio using aead_xchacha20_poly1305_rtpsize.
| PARAMETER | DESCRIPTION |
|---|---|
secret_key
|
32-byte AES encryption key provided by Discord.
TYPE:
|
nonce
|
32-bit packet counter.
TYPE:
|
header
|
RTP header (12 bytes).
TYPE:
|
audio
|
Opus audio payload.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bytes
|
The encrypted audio packet. |