Boost logo

Boost :

Subject: Re: [boost] Need to use SHA1 implementation in boost
From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2016-04-18 07:03:03


On Mon, Apr 18, 2016 at 6:55 AM, Thijs van den Berg <thijs_at_[hidden]> wrote:
> Maybe it's a good idea to release you version using the std::hash (or
> boost:hash) interface, although a separte library of common predefined hash
> function would be a more natural place for it?

We've got a proposal winding its way through the C++ standard process
which provides a new interface to computing hashes on objects suitable
for use with unordered containers:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3980.html

The problem is that while these interfaces are great for the purposes
of generating 32-bit or 64-bit digests for hash tables, they are
deficient for cryptographic purposes (i.e. producing a message
authentication code). For example, regular std::hash doesn't deal with
endiannes. But computing a cryptographic digest must yield the same
results on all platforms, and therefore cares about endianness.


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