[hash] properly display Digest just like cryptohash.

fix #8
This commit is contained in:
Vincent Hanquez 2015-06-09 14:35:23 +01:00
parent 8cc91a7bfe
commit 35bad8c241

View File

@ -54,4 +54,5 @@ newtype Digest a = Digest Bytes
deriving (Eq,Ord,ByteArrayAccess,NFData)
instance Show (Digest a) where
show (Digest bs) = show (B.convertToBase B.Base16 bs :: Bytes)
show (Digest bs) = map (toEnum . fromIntegral)
$ B.unpack (B.convertToBase B.Base16 bs :: Bytes)