Trait sequoia_openpgp::crypto::hash::Hash[][src]

pub trait Hash {
    fn hash(&self, hash: &mut dyn Digest);
}
Expand description

Hashes OpenPGP packets and related types.

Some OpenPGP data structures need to be hashed to be covered by OpenPGP signatures. Hashing is often based on the serialized form, with some aspects fixed to ensure consistent results. This trait implements hashing as specified by OpenPGP.

Most of the time it is not necessary to manually compute hashes. Instead, higher level functionality, like the streaming Verifier, DetachedVerifier, or Signature’s verification functions should be used, which handle the hashing internally.

This is a low-level mechanism. See Signature’s hashing functions for how to hash compounds like (Key,UserID)-bindings.

Required methods

Updates the given hash with this object.

Implementors