gosuto_livekit/room/e2ee/mod.rs
1// Copyright 2025 LiveKit, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15use std::fmt::{self, Debug, Formatter};
16
17use self::key_provider::KeyProvider;
18
19pub mod key_provider;
20pub mod manager;
21
22#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)]
23pub enum EncryptionType {
24 #[default]
25 None,
26 Gcm,
27 Custom,
28}
29
30#[derive(Clone)]
31pub struct E2eeOptions {
32 pub encryption_type: EncryptionType,
33 pub key_provider: KeyProvider,
34}
35
36impl Debug for E2eeOptions {
37 fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
38 f.debug_struct("E2eeOptions").field("encryption_type", &self.encryption_type).finish()
39 }
40}