// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // Copyright by contributors to this project. // SPDX-License-Identifier: (Apache-2.0 OR MIT)
use alloc::vec::Vec; use core::fmt::{self, Debug}; use mls_rs_codec::{MlsDecode, MlsEncode, MlsSize}; use mls_rs_core::extension::{ExtensionType, MlsCodecExtension};
use mls_rs_core::{group::ProposalType, identity::CredentialType};
#[cfg(feature = "by_ref_proposal")] use mls_rs_core::{
extension::ExtensionList,
identity::{IdentityProvider, SigningIdentity},
time::MlsTime,
};
usecrate::group::ExportedTree;
use mls_rs_core::crypto::HpkePublicKey;
/// Application specific identifier. /// /// A custom application level identifier that can be optionally stored /// within the `leaf_node_extensions` of a group [Member](crate::group::Member). #[derive(Clone, PartialEq, Eq, MlsSize, MlsEncode, MlsDecode)] pubstruct ApplicationIdExt { /// Application level identifier presented by this extension. #[mls_codec(with = "mls_rs_codec::byte_vec")] pub identifier: Vec<u8>,
}
/// Representation of an MLS ratchet tree. /// /// Used to provide new members /// a copy of the current group state in-band. #[derive(Clone, Debug, PartialEq, MlsSize, MlsEncode, MlsDecode)] pubstruct RatchetTreeExt { pub tree_data: ExportedTree<'static>,
}
/// Require members to have certain capabilities. /// /// Used within a /// [Group Context Extensions Proposal](crate::group::proposal::Proposal) /// in order to require that all current and future members of a group MUST /// support specific extensions, proposals, or credentials. /// /// # Warning /// /// Extension, proposal, and credential types defined by the MLS RFC and /// provided are considered required by default and should NOT be used /// within this extension. #[derive(Clone, Debug, PartialEq, Eq, MlsSize, MlsEncode, MlsDecode, Default)] pubstruct RequiredCapabilitiesExt { pub extensions: Vec<ExtensionType>, pub proposals: Vec<ProposalType>, pub credentials: Vec<CredentialType>,
}
/// External public key used for [External Commits](crate::Client::commit_external). /// /// This proposal type is optionally provided as part of a /// [Group Info](crate::group::Group::group_info_message). #[derive(Clone, Debug, PartialEq, Eq, MlsSize, MlsEncode, MlsDecode)] pubstruct ExternalPubExt { /// Public key to be used for an external commit. #[mls_codec(with = "mls_rs_codec::byte_vec")] pub external_pub: HpkePublicKey,
}
impl ExternalPubExt { /// Get the public key to be used for an external commit. pubfn external_pub(&self) -> &HpkePublicKey {
&self.external_pub
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.