From 35bad8c241baa641e9b04a5174aaa76a5608338b Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Tue, 9 Jun 2015 14:35:23 +0100 Subject: [PATCH] [hash] properly display Digest just like cryptohash. fix #8 --- Crypto/Hash/Types.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Crypto/Hash/Types.hs b/Crypto/Hash/Types.hs index 53c6791..ccf8bfc 100644 --- a/Crypto/Hash/Types.hs +++ b/Crypto/Hash/Types.hs @@ -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)