vincenthz / hs-cryptohash

efficient and practical cryptohashing in haskell. DEPRECATED in favor of cryptonite
Other
30 stars 24 forks source link

Add Crypto.Hash.Utils to exposed-modules #35

Closed k-bx closed 9 years ago

k-bx commented 9 years ago

Hi!

I'm currently struggling with doing something like:

toHex (hmac SHA256.hash 64 sign content)

with current set of public API of hs-cryptohash, since toHex is not exposed currently.

Thanks!

k-bx commented 9 years ago

@vincenthz ping, please merge!

vincenthz commented 9 years ago

cryptonite ( on hackage ) should solve all your problem. I don't think cryptohash should change now

k-bx commented 9 years ago

Ok, thanks!

PierreR commented 9 years ago

Sorry I still don't see how toHex is exposed in cryptonite. Should I depend on base16-bytestring ? I am just trying to convert the following from cryptohash to cryptonite:

md5 :: Text -> Text
md5 = Text.decodeUtf8 . digestToHexByteString . (Crypto.hash :: ByteString -> Digest MD5) . Text.encodeUtf8

https://github.com/bartavelle/language-puppet/blob/master/Puppet/Puppetlabs.hs#L24-L25

Thanks for your help.