diff options
Diffstat (limited to 'Hash.hs')
-rw-r--r-- | Hash.hs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -9,11 +9,11 @@ import qualified Data.ByteString.Char8 as C8 import qualified Crypto.Hash as H class Hashable a where - hash :: a -> HashPointer + hash :: a -> Hash instance Hashable B.ByteString where -- Encodes the SHA256 using base16 format - hash = HashPointer SHA256 . Val . C8.pack . show . sha256 + hash = Hash SHA256 . Val . C8.pack . show . sha256 instance Hashable Val where hash (Val v) = hash v @@ -22,7 +22,7 @@ sha256 :: B.ByteString -> H.Digest H.SHA256 sha256 = H.hash -- | Hash the concacenation of the hashes. -instance Hashable [HashPointer] where +instance Hashable [Hash] where hash = hash . B.concat . map (val . hashValue) instance Hashable a => Hashable (Activity a) where |