haskell-cafe@haskell.org
[Top] [All Lists]

Re: [Haskell-cafe] ANNOUNCE: hs-cryptohash 0.4

Subject: Re: [Haskell-cafe] ANNOUNCE: hs-cryptohash 0.4
From: John Meacham
Date: Fri, 2 Jul 2010 17:51:36 -0700
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/
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>