Driver: Remove legacy encryption algorithms.

There is probably some followup cleanup which can be done, but keeping
the general structure intact might help if there are future changes on
available (non-E2EE) algorithms.
This commit is contained in:
Kyle Simpson
2025-02-21 16:02:16 +00:00
parent 47cf0b27eb
commit f05b262dfe
8 changed files with 44 additions and 273 deletions

View File

@@ -554,7 +554,7 @@ impl Mixer {
);
let payload = rtp.payload_mut();
let pre_len = self.crypto_mode().payload_prefix_len2();
let pre_len = self.crypto_mode().payload_prefix_len();
payload[pre_len..pre_len + SILENT_FRAME.len()].copy_from_slice(&SILENT_FRAME[..]);
@@ -591,7 +591,7 @@ impl Mixer {
);
let payload = rtp.payload();
let opus_frame =
(payload[self.crypto_mode().payload_prefix_len2()..][..len]).to_vec();
(payload[self.crypto_mode().payload_prefix_len()..][..len]).to_vec();
OutputMessage::Passthrough(opus_frame)
},
@@ -637,7 +637,7 @@ impl Mixer {
let payload = rtp.payload_mut();
let crypto_mode = conn.crypto_state.kind();
let first_payload_byte = crypto_mode.payload_prefix_len2();
let first_payload_byte = crypto_mode.payload_prefix_len();
// If passthrough, Opus payload in place already.
// Else encode into buffer with space for AEAD encryption headers.
@@ -756,7 +756,7 @@ impl Mixer {
(Blame: VOICE_PACKET_MAX?)",
);
let payload = rtp.payload_mut();
let opus_frame = &mut payload[self.crypto_mode().payload_prefix_len2()..];
let opus_frame = &mut payload[self.crypto_mode().payload_prefix_len()..];
// Opus frame passthrough.
// This requires that we have only one PLAYING track, who has volume 1.0, and an