summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2021-01-11 13:00:42 +0100
committerJustus Winter <justus@sequoia-pgp.org>2021-01-11 13:00:42 +0100
commit5ce7fad7c87a08d2dd9a93a3f7dbf21aca0515c8 (patch)
tree68b7148c6918d96d27ccf052587e0ef0be43b42b
parent3367828e487fa79d2ec0a615e6b15dd5fbee5c9a (diff)
openpgp: Improve documentation.
-rw-r--r--openpgp/src/crypto/hash.rs25
1 files changed, 13 insertions, 12 deletions
diff --git a/openpgp/src/crypto/hash.rs b/openpgp/src/crypto/hash.rs
index 13645379..7b1a7578 100644
--- a/openpgp/src/crypto/hash.rs
+++ b/openpgp/src/crypto/hash.rs
@@ -383,20 +383,20 @@ impl Hash for signature::SignatureFields {
///
/// <a name="hashing-functions"></a>
impl signature::SignatureFields {
- /// Computes the message digest of standalone signatures.
+ /// Hashes this standalone signature.
pub fn hash_standalone(&self, hash: &mut dyn Digest)
{
self.hash(hash);
}
- /// Computes the message digest of timestamp signatures.
+ /// Hashes this timestamp signature.
pub fn hash_timestamp(&self, hash: &mut dyn Digest)
{
self.hash_standalone(hash);
}
- /// Returns the message digest of the direct key signature over
- /// the specified primary key.
+ /// Hashes this direct key signature over the specified primary
+ /// key, and the primary key.
pub fn hash_direct_key<P>(&self, hash: &mut dyn Digest,
key: &Key<P, key::PrimaryRole>)
where P: key::KeyParts,
@@ -405,8 +405,8 @@ impl signature::SignatureFields {
self.hash(hash);
}
- /// Returns the message digest of the subkey binding over the
- /// specified primary key and subkey.
+ /// Hashes this subkey binding over the specified primary key and
+ /// subkey, the primary key, and the subkey.
pub fn hash_subkey_binding<P, Q>(&self, hash: &mut dyn Digest,
key: &Key<P, key::PrimaryRole>,
subkey: &Key<Q, key::SubordinateRole>)
@@ -418,8 +418,8 @@ impl signature::SignatureFields {
self.hash(hash);
}
- /// Returns the message digest of the primary key binding over the
- /// specified primary key and subkey.
+ /// Hashes this primary key binding over the specified primary key
+ /// and subkey, the primary key, and the subkey.
pub fn hash_primary_key_binding<P, Q>(&self, hash: &mut dyn Digest,
key: &Key<P, key::PrimaryRole>,
subkey: &Key<Q, key::SubordinateRole>)
@@ -429,8 +429,8 @@ impl signature::SignatureFields {
self.hash_subkey_binding(hash, key, subkey);
}
- /// Returns the message digest of the user ID binding over the
- /// specified primary key, user ID, and signature.
+ /// Hashes this user ID binding over the specified primary key and
+ /// user ID, the primary key, and the userid.
pub fn hash_userid_binding<P>(&self, hash: &mut dyn Digest,
key: &Key<P, key::PrimaryRole>,
userid: &UserID)
@@ -441,8 +441,9 @@ impl signature::SignatureFields {
self.hash(hash);
}
- /// Returns the message digest of the user attribute binding over
- /// the specified primary key, user attribute, and signature.
+ /// Hashes this user attribute binding over the specified primary
+ /// key and user attribute, the primary key, and the user
+ /// attribute.
pub fn hash_user_attribute_binding<P>(
&self,
hash: &mut dyn Digest,