The review of std.hash package
Dmitry Olshansky
dmitry.olsh at gmail.com
Thu Aug 9 09:37:52 PDT 2012
On 09-Aug-12 20:32, Dmitry Olshansky wrote:
> On 09-Aug-12 14:15, Regan Heath wrote:
>> On Thu, 09 Aug 2012 10:59:47 +0100, David Nadlinger <see at klickverbot.at>
>
>> If the range/hash object stores the current state and returns this as
>> the result of hashreduce, it would be chainable. If it also had a
>> "Digest" property/method which performed finish on a /temporary copy/ of
>> the state it would almost be as automatic as reduce. There would still
>> be a manual step to get the result, but it would be analogous to calling
>> toString on any range object to output it's "value". The Digest
>> property/method would not modify the internal state, and could be called
>> at any time between (not sure there is a point to this) or after chained
>> hashreduce operations.
>
> struct ShaState
> {
> ...
> alias ubyte[16] getDidgest();
> }
Too fast.. should have been:
ubyte[16] getDidgest();
alias getDigest this;
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list