VoiceGroupCryptoInterface
in
Interface for group-based AEAD encryption and decryption for Discord voice RTP packets.
Tags
Table of Contents
Methods
- decryptRTPPacket() : string|false
- Decrypts the payload of an RTP `$packet` for the current voice group.
- encryptRTPPacket() : string
- Encrypts the payload of an RTP `$packet` for the current voice group.
Methods
decryptRTPPacket()
Decrypts the payload of an RTP `$packet` for the current voice group.
public
decryptRTPPacket(VoicePacket $packet[, int $seq = 0 ]) : string|false
Parameters
- $packet : VoicePacket
- $seq : int = 0
-
RTP sequence number, mixed into the nonce.
Return values
string|false —The decrypted bytes, or false on authentication failure.
encryptRTPPacket()
Encrypts the payload of an RTP `$packet` for the current voice group.
public
encryptRTPPacket(VoicePacket $packet[, int $seq = 0 ]) : string
Parameters
- $packet : VoicePacket
- $seq : int = 0
-
RTP sequence number, mixed into the nonce.
Return values
string —The encrypted packet bytes.