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

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

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

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

Updates the given hash with this object.

Loading content...


impl Hash for Ciphertext[src]

impl Hash for PublicKey[src]

impl Hash for SecretKeyMaterial[src]

impl Hash for sequoia_openpgp::crypto::mpi::Signature[src]

impl Hash for sequoia_openpgp::packet::Signature[src]

impl Hash for MPI[src]

impl Hash for Signature4[src]

impl Hash for SignatureFields[src]

impl Hash for UserID[src]

impl Hash for UserAttribute[src]

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

Loading content...