From f7999cecc2bb0c76d88005444478e8500c624786 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 19 Apr 2017 20:07:47 -0400 Subject: fully working signatures This commit was sponsored by Ethan Aubin. --- Hash.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Hash.hs') 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 -- cgit v1.2.3