Function verify_with_public_key

Source
pub fn verify_with_public_key(
    public_key: &PublicKeyInfo,
    signed_data: &[u8],
    signature: &[u8],
    digest_algorithm: &str,
) -> Result<bool>
Expand description

Verify a signature using the extracted public key

For CMS signatures with signed attributes, pass the DER-encoded attributes as signed_data. For direct signatures, pass the original content.

ยงErrors

Returns an error if the public key algorithm is unsupported or signature verification fails.