DiscordPHP Documentation

VoiceGroupCryptoInterface

Interface for group-based AEAD encryption and decryption for Discord voice RTP packets.

Tags
author

Valithor Obsidion valithor@valgorithms.com

link
https://docs.discord.com/developers/topics/voice-connections#transport-encryption-and-sending-voice
since
10.41.0

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.

On this page

Search results