Trait sequoia_openpgp::crypto::hash::Hash

source ·
pub trait Hash {
    // Required method
    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§

source

fn hash(&self, hash: &mut dyn Digest)

Updates the given hash with this object.

Implementors§

source§

impl Hash for sequoia_openpgp::packet::Signature

source§

impl Hash for Ciphertext

source§

impl Hash for PublicKey

source§

impl Hash for SecretKeyMaterial

source§

impl Hash for sequoia_openpgp::crypto::mpi::Signature

source§

impl Hash for Signature3

source§

impl Hash for Signature4

source§

impl Hash for SignatureFields

source§

impl Hash for UserID

source§

impl Hash for UserAttribute

source§

impl Hash for MPI

source§

impl<P, R> Hash for Key4<P, R>
where P: KeyParts, R: KeyRole,