vincenthz / hs-cryptohash

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

SHA3-384 #22

Closed dmbarbour closed 10 years ago

dmbarbour commented 10 years ago

I would like to use some of the variant sizes for SHA3, esp. SHA3-384.

vincenthz commented 10 years ago

what is stopping you ?

dmbarbour commented 10 years ago

The API documentation, I suspect. It isn't clear to me how to init or finalize SHA3-384 with a particular length. SHA2 has dedicated modules for each length, so in comparison it's quite clear. SHA3 doesn't even indicate the length.

dmbarbour commented 10 years ago

Is the 'Int' argument in bits, as in 'SHA3-384' uses the argument '384'?

vincenthz commented 10 years ago

you can either use the SHA3 module and the length of 'hash' and 'init' would be 384 indeed, or you can use the generalized hash interface:

 import Crypto.Hash (hash, SHA3_384)
 hash bytestringToHash :: Digest SHA3_384
dmbarbour commented 10 years ago

Ah, I hadn't even noticed the 'generalized Crypto.Hash interface'.

On Mon, Apr 28, 2014 at 1:20 PM, Vincent Hanquez notifications@github.comwrote:

you can either use the SHA3 module and the length of 'hash' and 'init' would be 384 indeed, or you can use the generalized hash interface:

import Crypto.Hash (hash, SHA3_384) hash bytestringToHash :: Digest SHA3_384

— Reply to this email directly or view it on GitHubhttps://github.com/vincenthz/hs-cryptohash/issues/22#issuecomment-41594139 .