summaryrefslogtreecommitdiff
path: root/alot/crypto.py
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2016-11-30 02:32:46 -0500
committerDylan Baker <dylan@pnwbakers.com>2017-08-14 09:33:07 -0700
commitc552af6a8b5e5762a657ac554cf1d8b8db78ea90 (patch)
tree2d8bfc42d9894f6da22ce5dede2227e74bfa5bbd /alot/crypto.py
parentb0e2f322aa571a5e1999c069779f589e282a566c (diff)
just use the OpenPGP fingerprint instead of inventing "hash_key"
Diffstat (limited to 'alot/crypto.py')
-rw-r--r--alot/crypto.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/alot/crypto.py b/alot/crypto.py
index 3700aeef..7d62bb8a 100644
--- a/alot/crypto.py
+++ b/alot/crypto.py
@@ -218,23 +218,6 @@ def decrypt_verify(encrypted):
return verify_result.signatures, plaintext
-def hash_key(key):
- """
- Returns a hash of the given key. This is a workaround for
- https://bugs.launchpad.net/pygpgme/+bug/1089865
- and can be removed if the missing feature is added to pygpgme.
-
- :param key: the key we want a hash of
- :type key: gpgme.Key
- :returns: a hash of the key
- :rtype: str
- """
- hash_str = ""
- for tmp_key in key.subkeys:
- hash_str += tmp_key.keyid
- return hash_str
-
-
def validate_key(key, sign=False, encrypt=False):
"""Assert that a key is valide and optionally that it can be used for
signing or encrypting. Raise GPGProblem otherwise.