pub struct VerifiableGroupInfo { /* private fields */ }
Expand description
A type that represents a group info of which the signature has not been verified.
It implements the Verifiable
trait and can be turned into a group info by calling
verify(...)
with the signature key of the Credential
.
When receiving a serialized group info, it can only be deserialized into a
VerifiableGroupInfo
, which can then be turned into a group info as described above.
Implementations§
Source§impl VerifiableGroupInfo
impl VerifiableGroupInfo
Sourcepub fn new(
group_context: GroupContext,
extensions: Extensions,
confirmation_tag: ConfirmationTag,
signer: LeafNodeIndex,
signature: Signature,
) -> Self
pub fn new( group_context: GroupContext, extensions: Extensions, confirmation_tag: ConfirmationTag, signer: LeafNodeIndex, signature: Signature, ) -> Self
Create a new VerifiableGroupInfo
from its contents.
Sourcepub fn ciphersuite(&self) -> Ciphersuite
pub fn ciphersuite(&self) -> Ciphersuite
Get (unverified) ciphersuite of the verifiable group info.
Note: This method should only be used when necessary to verify the group info signature.
Sourcepub fn extensions(&self) -> &Extensions
pub fn extensions(&self) -> &Extensions
Get (unverified) extensions of the verifiable group info.
Note: This method should only be used when necessary to verify the group info signature.
Sourcepub fn group_id(&self) -> &GroupId
pub fn group_id(&self) -> &GroupId
Get (unverified) group ID of the verifiable group info.
Note: This method should only be used when necessary to verify the group info signature.
Sourcepub fn epoch(&self) -> GroupEpoch
pub fn epoch(&self) -> GroupEpoch
Get (unverified) epoch of the verifiable group info.
Note: This method should only be used when necessary to verify the group info signature.
Trait Implementations§
Source§impl Clone for VerifiableGroupInfo
impl Clone for VerifiableGroupInfo
Source§fn clone(&self) -> VerifiableGroupInfo
fn clone(&self) -> VerifiableGroupInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for VerifiableGroupInfo
impl Debug for VerifiableGroupInfo
Source§impl Deserialize for VerifiableGroupInfo
impl Deserialize for VerifiableGroupInfo
Source§fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
bytes
from the provided a std::io::Read
and returns the populated struct. Read moreSource§impl DeserializeBytes for VerifiableGroupInfo
impl DeserializeBytes for VerifiableGroupInfo
Source§impl PartialEq for VerifiableGroupInfo
impl PartialEq for VerifiableGroupInfo
Source§impl Size for &VerifiableGroupInfo
impl Size for &VerifiableGroupInfo
fn tls_serialized_len(&self) -> usize
Source§impl Size for VerifiableGroupInfo
impl Size for VerifiableGroupInfo
fn tls_serialized_len(&self) -> usize
Source§impl Verifiable for VerifiableGroupInfo
impl Verifiable for VerifiableGroupInfo
Source§type VerifiedStruct = GroupInfo
type VerifiedStruct = GroupInfo
VerifiedStruct
.Source§fn unsigned_payload(&self) -> Result<Vec<u8>, Error>
fn unsigned_payload(&self) -> Result<Vec<u8>, Error>
Source§fn verify(
self,
crypto: &impl OpenMlsCrypto,
pk: &OpenMlsSignaturePublicKey,
) -> Result<Self::VerifiedStruct, SignatureError>
fn verify( self, crypto: &impl OpenMlsCrypto, pk: &OpenMlsSignaturePublicKey, ) -> Result<Self::VerifiedStruct, SignatureError>
credential
.
Usually this is implemented by first checking that self.verify_no_out()
does not return an error, and then converting the value into
Self::VerifiedStruct
. Read moreSource§fn verify_no_out(
&self,
crypto: &impl OpenMlsCrypto,
pk: &OpenMlsSignaturePublicKey,
) -> Result<(), SignatureError>
fn verify_no_out( &self, crypto: &impl OpenMlsCrypto, pk: &OpenMlsSignaturePublicKey, ) -> Result<(), SignatureError>
Verifiable::signature()
function and
the payload via Verifiable::unsigned_payload()
. Read moreimpl StructuralPartialEq for VerifiableGroupInfo
Auto Trait Implementations§
impl Freeze for VerifiableGroupInfo
impl RefUnwindSafe for VerifiableGroupInfo
impl Send for VerifiableGroupInfo
impl Sync for VerifiableGroupInfo
impl Unpin for VerifiableGroupInfo
impl UnwindSafe for VerifiableGroupInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more