summaryrefslogtreecommitdiffhomepage
path: root/Hash.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-19 20:07:47 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-19 20:07:47 -0400
commitf7999cecc2bb0c76d88005444478e8500c624786 (patch)
tree9deccd684e1333dca028d980489892ac4189582b /Hash.hs
parent6f7cf857b408401abdc4477c888495b4f13162c7 (diff)
downloaddebug-me-f7999cecc2bb0c76d88005444478e8500c624786.tar.gz
fully working signatures
This commit was sponsored by Ethan Aubin.
Diffstat (limited to 'Hash.hs')
-rw-r--r--Hash.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Hash.hs b/Hash.hs
index e22abf3..bef3ae0 100644
--- a/Hash.hs
+++ b/Hash.hs
@@ -45,6 +45,12 @@ instance Hashable Entered where
instance Hashable Seen where
hash v = hash $ Tagged "Seen" [hash (seenData v)]
+instance Hashable ControlAction where
+ hash (Rejected a) = hash $ Tagged "Rejected" a
+ hash (SessionKey pk) = hash $ Tagged "SessionKey" pk
+ hash (SessionKeyAccepted pk) = hash $ Tagged "SessionKeyAccepted" pk
+ hash (SessionKeyRejected pk) = hash $ Tagged "SessionKeyRejected" pk
+
instance Hashable Signature where
hash (Ed25519Signature s) = hash $ Tagged "Ed25519Signature" s
hash (OtherSignature s) = hash $ Tagged "OtherSignature" s