pub trait ExternallySigned<T>: Sized {
    type Key: ?Sized;
    type KeyHint;
    type Error;
    fn key_is_correct(&self, k: &Self::Key) -> Result<(), Self::KeyHint>;
fn is_well_signed(&self, k: &Self::Key) -> Result<(), Self::Error>;
fn dangerously_assume_wellsigned(self) -> T; fn check_signature(self, k: &Self::Key) -> Result<T, Self::Error> { ... } }
Expand description

A cryptographically signed object that needs an external public key to validate it.

Associated Types

The type of the public key object.

You can use a tuple or a vector here if the object is signed with multiple keys.

A type that describes what keys are missing for this object.

An error type that’s returned when the object is not well-signed.

Required methods

Check whether k is the right key for this object. If not, return an error describing what key would be right.

This function is allowed to return ‘true’ for a bad key, but never ‘false’ for a good key.

Check the signature on this object

Unwrap this object without checking any signatures on it.

Provided methods

Unwrap this object if it’s correctly signed by a provided key.

Implementors