pub fn verify_signature(
        &self,
        author: AccountAddress,
        hash: HashValue,
        signature: &Ed25519Signature,
    ) -> std::result::Result<(), VerifyError> {
        match self.get_public_key(&author) {
            Some(public_key) => {
                if public_key.verify_signature(&hash, signature).is_err() {
                    Err(VerifyError::InvalidSignature)
                } else {
                    Ok(())
                }
            }
            None => Err(VerifyError::UnknownAuthor),
        }
    }
/// Verify the correctness of a signature of a hash by a known author.
Verify the correctness of a signature of a hash by a known author.
Verify the correctness of a signature of a hash by a known author .
pub fn verify_signature(
        &self,
        author: AccountAddress,
        hash: HashValue,
        signature: &Ed25519Signature,
    ) -> std::result::Result<(), VerifyError> {
        match self.get_public_key(&author) {
            Some(public_key) => {
                if public_key.verify_signature(&hash, signature).is_err() {
                    Err(VerifyError::InvalidSignature)
                } else {
                    Ok(())
                }
            }
            None => Err(VerifyError::UnknownAuthor),
        }
    }
pub fn verify_signature ( & self , author : AccountAddress , hash : HashValue , signature : & Ed25519Signature , ) -> std :: result :: Result < ( ) , VerifyError > { match self . get_public_key ( & author ) { Some ( public_key ) => { if public_key . verify_signature ( & hash , signature ) . is_err ( ) { Err ( VerifyError :: InvalidSignature ) } else { Ok ( ( ) ) } } None => Err ( VerifyError :: UnknownAuthor ) , } }
Verify the correctness of a signature of a hash by a known author.
Verify the correctness of a signature of a hash by a known author .
&self
author
AccountAddress
hash
HashValue
signature
&Ed25519Signature
&self
author
AccountAddress
hash
HashValue
signature
&Ed25519Signature