Trait rings_core::message::MessageVerificationExt

source ·
pub trait MessageVerificationExt {
    // Required methods
    fn verification_data(&self) -> Result<Vec<u8>>;
    fn verification(&self) -> &MessageVerification;

    // Provided methods
    fn is_expired(&self) -> bool { ... }
    fn verify(&self) -> bool { ... }
    fn signer(&self) -> Did { ... }
}
Expand description

This trait helps a struct with MessageVerification field to verify itself. It also provides a signer method to let receiver know who sent the message.

Required Methods§

source

fn verification_data(&self) -> Result<Vec<u8>>

Give the data to be verified.

source

fn verification(&self) -> &MessageVerification

Give the verification field for verifying.

Provided Methods§

source

fn is_expired(&self) -> bool

Checks whether the message is expired.

source

fn verify(&self) -> bool

Verifies that the message is not expired and that the signature is valid.

source

fn signer(&self) -> Did

Get signer did from verification.

Implementors§