Boost logo

Boost :

Subject: Re: [boost] [rfc] Preliminary Hash Library
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2010-05-06 05:46:00


> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On Behalf Of Scott McMurray
> Sent: Thursday, May 06, 2010 1:56 AM
> To: Boost Developers List
> Subject: [boost] [rfc] Preliminary Hash Library
>
> I've boostified, cleaned up, and documented the Hash Library I
> mentioned here about a month ago. Comments, complaints, suggestions,
> and questions appreciated.
>
> Source code is in the sandbox at http://svn.boost.org/svn/boost/sandbox/hash/
>
> Documentation can be read online at http://www.cs.mcgill.ca/~smcmur/hash/
>
> I was very pleased by how the implementation came together, as
> templates mean that all the hash algorithms share a substantial
> portion of their code.
>
> Those details are all hidden from the user, though. Here's an example
> showing the simplest use of the library:
>
> #include <boost/hash.hpp>
>
> #include <iostream>
> #include <string>
>
> int main() {
> std::string s = "Hello World!";
> typedef boost::hash::sha2<256> HashPolicy;
> HashPolicy::digest_type digest = boost::hash::compute_digest<HashPolicy>(s);
> std::cout << digest << "\n";
> }

Looks neat.

This is going to be used by lots of total amateurs (it might be me!).

So the start is a bit steep?

That this is a *cryptographic* hash and a few words and/or links to Wikipedia etc might help?

http://en.wikipedia.org/wiki/Cryptographic_hash_function say?

A *default* hash policy would also be nice? So the quickstart could be even quicker ;-)

MD5 is most suitable for 'amateur' use? - and it is most popular for file digests.

(SHA will be chosen by anyone serious).

And the quickstart is fine, but a simple hash-my-file example would be good too?

Paul

---
Paul A. Bristow
Prizet Farmhouse
Kendal, UK   LA8 8AB
+44 1539 561830, mobile +44 7714330204
pbristow_at_[hidden]

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