Struct openmls::credentials::BasicCredential
source · [−]pub struct BasicCredential { /* private fields */ }
Expand description
Basic Credential.
A BasicCredential
as defined in the MLS protocol spec. It exposes an
identity
to represent the client, as well as a signature public key, along
with the corresponding signature scheme.
Implementations
sourceimpl BasicCredential
impl BasicCredential
sourcepub fn verify(
&self,
backend: &impl OpenMlsCryptoProvider,
payload: &[u8],
signature: &Signature
) -> Result<(), CredentialError>
pub fn verify(
&self,
backend: &impl OpenMlsCryptoProvider,
payload: &[u8],
signature: &Signature
) -> Result<(), CredentialError>
Verifies a signature issued by a BasicCredential
.
Returns a CredentialError
if the verification fails.
Trait Implementations
sourceimpl Clone for BasicCredential
impl Clone for BasicCredential
sourcefn clone(&self) -> BasicCredential
fn clone(&self) -> BasicCredential
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BasicCredential
impl Debug for BasicCredential
sourceimpl Deserialize for BasicCredential
impl Deserialize for BasicCredential
sourcefn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
This function deserializes the bytes
from the provided a std::io::Read
and returns the populated struct. Read more
sourceimpl<'de> Deserialize<'de> for BasicCredential
impl<'de> Deserialize<'de> for BasicCredential
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<BasicCredential> for BasicCredential
impl PartialEq<BasicCredential> for BasicCredential
sourceimpl Serialize for BasicCredential
impl Serialize for BasicCredential
sourceimpl Serialize for BasicCredential
impl Serialize for BasicCredential
sourceimpl Serialize for &BasicCredential
impl Serialize for &BasicCredential
sourceimpl Size for BasicCredential
impl Size for BasicCredential
fn tls_serialized_len(&self) -> usize
sourceimpl Size for &BasicCredential
impl Size for &BasicCredential
fn tls_serialized_len(&self) -> usize
Auto Trait Implementations
impl RefUnwindSafe for BasicCredential
impl Send for BasicCredential
impl Sync for BasicCredential
impl Unpin for BasicCredential
impl UnwindSafe for BasicCredential
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more