{"action":"created","issue":{"url":"https://api.github.com/repos/vincenthz/cryptonite/issues/8","labels_url":"https://api.github.com/repos/vincenthz/cryptonite/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/vincenthz/cryptonite/issues/8/comments","events_url":"https://api.github.com/repos/vincenthz/cryptonite/issues/8/events","html_url":"https://github.com/vincenthz/cryptonite/issues/8","id":86118132,"number":8,"title":"Question regarding different `Show` instances for `Digest` between `cryptonite` and `cryptohash`","user":{"login":"menelaos","id":7543610,"avatar_url":"https://avatars.githubusercontent.com/u/7543610?v=3","gravatar_id":"","url":"https://api.github.com/users/menelaos","html_url":"https://github.com/menelaos","followers_url":"https://api.github.com/users/menelaos/followers","following_url":"https://api.github.com/users/menelaos/following{/other_user}","gists_url":"https://api.github.com/users/menelaos/gists{/gist_id}","starred_url":"https://api.github.com/users/menelaos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/menelaos/subscriptions","organizations_url":"https://api.github.com/users/menelaos/orgs","repos_url":"https://api.github.com/users/menelaos/repos","events_url":"https://api.github.com/users/menelaos/events{/privacy}","received_events_url":"https://api.github.com/users/menelaos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-08T10:22:47Z","updated_at":"2015-06-09T05:39:55Z","closed_at":null,"body":"The following code snippet yields different results for both packages.\r\n\r\n```haskell\r\nimport Crypto.Hash\r\nimport qualified Data.ByteString.Char8 as BSC\r\n\r\nhash' bs = hash bs :: Digest MD5\r\n\r\nshow . hash' . BSC.pack $ \"foo\"\r\n-- Returns\r\n--   \"\\\"acbd18db4cc2f85cedef654fccc4a4d8\\\"\" for cryptonite\r\n--     \"acbd18db4cc2f85cedef654fccc4a4d8\"   for cryptohash\r\n```\r\n\r\nThis is probably due to the different `Show` instances:\r\n\r\nCryptonite:\r\n```haskell\r\ninstance Show (Digest a) where\r\n    show (Digest bs) = show (B.convertToBase B.Base16 bs :: Bytes)\r\n```\r\n\r\nCryptohash:\r\n```haskell\r\ninstance Show (Digest a) where\r\n    show (Digest bs) = BC.unpack $ toHex bs\r\n```\r\n\r\nWill the instance in `cryptonite` stay as it is?\r\nThis would prevent `cryptonite` from being used as a drop-in replacement\r\nfor `cryptohash`, but maybe it isn't intended as such.\r\n"},"comment":{"url":"https://api.github.com/repos/vincenthz/cryptonite/issues/comments/110230687","html_url":"https://github.com/vincenthz/cryptonite/issues/8#issuecomment-110230687","issue_url":"https://api.github.com/repos/vincenthz/cryptonite/issues/8","id":110230687,"user":{"login":"vincenthz","id":174631,"avatar_url":"https://avatars.githubusercontent.com/u/174631?v=3","gravatar_id":"","url":"https://api.github.com/users/vincenthz","html_url":"https://github.com/vincenthz","followers_url":"https://api.github.com/users/vincenthz/followers","following_url":"https://api.github.com/users/vincenthz/following{/other_user}","gists_url":"https://api.github.com/users/vincenthz/gists{/gist_id}","starred_url":"https://api.github.com/users/vincenthz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincenthz/subscriptions","organizations_url":"https://api.github.com/users/vincenthz/orgs","repos_url":"https://api.github.com/users/vincenthz/repos","events_url":"https://api.github.com/users/vincenthz/events{/privacy}","received_events_url":"https://api.github.com/users/vincenthz/received_events","type":"User","site_admin":false},"created_at":"2015-06-09T05:39:55Z","updated_at":"2015-06-09T05:39:55Z","body":"yes, I think that should be a bug at this stage. There's no reason the show instance should be different"}}