openmls/extensions/
application_id_extension.rs1use tls_codec::{TlsDeserialize, TlsDeserializeBytes, TlsSerialize, TlsSize, VLBytes};
2
3use super::{Deserialize, Serialize};
4
5#[derive(
10 PartialEq,
11 Eq,
12 Clone,
13 Debug,
14 Serialize,
15 Deserialize,
16 TlsSerialize,
17 TlsDeserialize,
18 TlsDeserializeBytes,
19 TlsSize,
20)]
21pub struct ApplicationIdExtension {
22 key_id: VLBytes,
23}
24
25impl ApplicationIdExtension {
26 pub fn new(id: &[u8]) -> Self {
28 Self { key_id: id.into() }
29 }
30
31 pub fn as_slice(&self) -> &[u8] {
33 self.key_id.as_slice()
34 }
35}