diff options
author | Joe Crayne <joe@jerkface.net> | 2020-05-18 16:48:40 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-05-19 11:59:23 -0400 |
commit | 71075999e9c7cbcb16220c47c750e859d3ccc7e2 (patch) | |
tree | 7b6c4779c172c7597dbd98ea1cc7eff897a3c6d2 /Data/OpenPGP/Util | |
parent | a901da5942b29e0a3f1ce358b6c14f56984934e7 (diff) |
Eq/Ord instances for Fingerprint + defaultFeatures packet.
Diffstat (limited to 'Data/OpenPGP/Util')
-rw-r--r-- | Data/OpenPGP/Util/DecryptSecretKey.hs | 2 | ||||
-rw-r--r-- | Data/OpenPGP/Util/Fingerprint.hs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Data/OpenPGP/Util/DecryptSecretKey.hs b/Data/OpenPGP/Util/DecryptSecretKey.hs index 9f9e42a..753cef3 100644 --- a/Data/OpenPGP/Util/DecryptSecretKey.hs +++ b/Data/OpenPGP/Util/DecryptSecretKey.hs | |||
@@ -76,7 +76,7 @@ decryptSecretKey pass k@(OpenPGP.SecretKeyPacket { | |||
76 | OpenPGP.version = 4, OpenPGP.key_algorithm = kalgo, | 76 | OpenPGP.version = 4, OpenPGP.key_algorithm = kalgo, |
77 | OpenPGP.s2k = s2k, OpenPGP.symmetric_algorithm = salgo, | 77 | OpenPGP.s2k = s2k, OpenPGP.symmetric_algorithm = salgo, |
78 | OpenPGP.key = existing, OpenPGP.encrypted_data = encd | 78 | OpenPGP.key = existing, OpenPGP.encrypted_data = encd |
79 | }) | chkF material == LZ.toStrict chk = | 79 | }) | chkF material == LZ.toStrict chk = -- TODO: v5 |
80 | fmap (\m -> k { | 80 | fmap (\m -> k { |
81 | OpenPGP.s2k_useage = 0, | 81 | OpenPGP.s2k_useage = 0, |
82 | OpenPGP.symmetric_algorithm = OpenPGP.Unencrypted, | 82 | OpenPGP.symmetric_algorithm = OpenPGP.Unencrypted, |
diff --git a/Data/OpenPGP/Util/Fingerprint.hs b/Data/OpenPGP/Util/Fingerprint.hs index 955748d..422beac 100644 --- a/Data/OpenPGP/Util/Fingerprint.hs +++ b/Data/OpenPGP/Util/Fingerprint.hs | |||
@@ -23,6 +23,7 @@ oo :: (b -> c) -> (a -> a1 -> b) -> a -> a1 -> c | |||
23 | oo = (.) . (.) | 23 | oo = (.) . (.) |
24 | 24 | ||
25 | newtype Fingerprint = Fingerprint BS.ByteString | 25 | newtype Fingerprint = Fingerprint BS.ByteString |
26 | deriving (Eq,Ord) | ||
26 | 27 | ||
27 | instance Show Fingerprint where | 28 | instance Show Fingerprint where |
28 | show fp = hex fp | 29 | show fp = hex fp |