/// Verify a signature by the private key corresponding to this
/// SubjectPublicKeyInfo. `restrictions` indicates the restrictions on
/// allowed algorithms.
Verify a signature by the private key corresponding to this
SubjectPublicKeyInfo. `restrictions` indicates the restrictions on
allowed algorithms.
Verify a signature by the private key corresponding to this SubjectPublicKeyInfo . ` restrictions ` indicates the restrictions on allowed algorithms .
pub fn check_signature(
        &self, algorithm: SignatureScheme, message: &[u8], signature: &[u8],
        restrictions: Restrictions,
    ) -> Result<(), Error> {
        self.public_key(algorithm, restrictions)?
            .verify(message, signature)
            .map_err(|_| Error::InvalidSignatureForPublicKey)
    }
pub fn check_signature ( & self , algorithm : SignatureScheme , message : & [ u8 ] , signature : & [ u8 ] , restrictions : Restrictions , ) -> Result < ( ) , Error > { self . public_key ( algorithm , restrictions ) ? . verify ( message , signature ) . map_err ( | _ | Error :: InvalidSignatureForPublicKey ) }
Verify a signature by the private key corresponding to this
SubjectPublicKeyInfo.
Verify a signature by the private key corresponding to this SubjectPublicKeyInfo .
&self
algorithm
SignatureScheme
message
&[u8]
signature
&[u8]
restrictions
Restrictions