[Haskell-cafe] ANNOUNCE: hs-cryptohash 0.4

John Meacham john at repetae.net
Fri Jul 2 20:51:36 EDT 2010


On Fri, Jul 02, 2010 at 08:48:07PM -0400, Brandon S Allbery KF8NH wrote:
> On 7/2/10 17:24 , Gregory Crosswhite wrote:
> > The problem with this approach is that the hash context isn't a monoid;  you
> > can absorb data into the context, but you can't combine two hash contexts to
> > form a new one.  Thus, the Writer monad won't work for this purpose.
> 
> No?  The context is simply a String, which is a monoid, and you can combine
> contexts quite meaningfully before you actually compute the final hash (in
> fact, that's the whole point!).

The context isn't a string. it is an intermediate state in the algorithm
of the hash function. it is usually an opaque binary blob (represented by a
ByteString) of a size that is on the order of the final hash (unrelated
to the size of the input).

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/


More information about the Haskell-Cafe mailing list