pub fn verify(
        &self,
        backend: &impl OpenMlsCryptoProvider,
        payload: &[u8],
        signature: &Signature,
    ) -> Result<(), CredentialError> {
        match &self.credential {
            MlsCredentialType::Basic(basic_credential) => basic_credential
                .public_key
                .verify(backend, signature, payload)
                .map_err(|_| CredentialError::InvalidSignature),
            // TODO: implement verification for X509 certificates. See issue #134.
            MlsCredentialType::X509(_) => panic!("X509 certificates are not yet implemented."),
        }
    }
/// Verify a signature of a given payload against the public key contained
/// in a credential.
Verify a signature of a given payload against the public key contained
in a credential.
Verify a signature of a given payload against the public key contained in a credential .
pub fn verify(
        &self,
        backend: &impl OpenMlsCryptoProvider,
        payload: &[u8],
        signature: &Signature,
    ) -> Result<(), CredentialError> {
        match &self.credential {
            MlsCredentialType::Basic(basic_credential) => basic_credential
                .public_key
                .verify(backend, signature, payload)
                .map_err(|_| CredentialError::InvalidSignature),
            // TODO: implement verification for X509 certificates. See issue #134.
            MlsCredentialType::X509(_) => panic!("X509 certificates are not yet implemented."),
        }
    }
pub fn verify ( & self , backend : & impl OpenMlsCryptoProvider , payload : & [ u8 ] , signature : & Signature , ) -> Result < ( ) , CredentialError > { match & self . credential { MlsCredentialType :: Basic ( basic_credential ) => basic_credential . public_key . verify ( backend , signature , payload ) . map_err ( | _ | CredentialError :: InvalidSignature ) , // TODO: implement verification for X509 certificates. See issue #134. MlsCredentialType :: X509 ( _ ) => panic ! ( " " ) , } }
Verify a signature of a given payload against the public key contained
in a credential.
Verify a signature of a given payload against the public key contained in a credential .
&self
backend
&impl OpenMlsCryptoProvider
payload
&[u8]
signature
&Signature
&self
backend
&impl OpenMlsCryptoProvider
payload
&[u8]
signature
&Signature