Boost logo

Boost :

Subject: Re: [boost] Crypto/hashes library?
From: Howard Hinnant (howard.hinnant_at_[hidden])
Date: 2017-09-07 16:26:56


On Sep 7, 2017, at 12:11 PM, Vinnie Falco via Boost <boost_at_[hidden]> wrote:
>
> On Thu, Sep 7, 2017 at 8:30 AM, Niall Douglas via Boost
> <boost_at_[hidden]> wrote:
>> I vaguely remember that...Howard had some WG21 proposal for a
>> standardised hashing infrastructure? One not fundamentally broken like
>> std::hash. One should probably study/implement that proposal.
>
> You're thinking of hash_append, described here:
>
> <http://htmlpreview.github.io/?https://github.com/HowardHinnant/papers/blob/master/hashing.html>
>
> Repository:
>
> <https://github.com/howardhinnant/hash_append>
>
> This library is designed for non-cryptographic hashing. Specifically
> for unordered containers (hash tables). The requirements for
> cryptographic hash algorithms are different, and difficult to unify
> with the use-case for hash tables.
>
> For example when calculating the cryptographic digest on serialized
> data, endianness of integers matters.

endian taken into account here:

https://github.com/HowardHinnant/hash_append/blob/master/sha256.h#L30

(example sha256 hasher)

xstd::endian is now C++17 (as std::endian, 23.15.9 [meta.endian]).

Howard




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk