summaryrefslogtreecommitdiffhomepage
path: root/Hash.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-18 16:35:38 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-18 16:35:38 -0400
commitd73352f848b79224a94e531bb651897321064998 (patch)
tree4e4bb7f13113bfffc950a0451dd89b6ca8160070 /Hash.hs
parenta70548f6dade6d93d482510a1b68b99327ec7f4a (diff)
downloaddebug-me-d73352f848b79224a94e531bb651897321064998.tar.gz
initial Crypto
Will use Ed25519 because it's from DJB and well regarded and in common use now.
Diffstat (limited to 'Hash.hs')
-rw-r--r--Hash.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Hash.hs b/Hash.hs
index ed4513b..2577c6b 100644
--- a/Hash.hs
+++ b/Hash.hs
@@ -50,7 +50,8 @@ instance Hashable Seen where
hash v = hash $ Tagged "Seen" [hash (seenData v)]
instance Hashable Signature where
- hash (Signature s) = hash $ Tagged "Signature" s
+ hash (Ed25519 s) = hash $ Tagged "Ed25519" s
+ hash Unsigned = hash $ Tagged "Unsigned" (mempty :: B.ByteString)
-- | Hash a list of hashes by hashing the concacenation of the hashes.
instance Hashable [Hash] where