Back to Index

The MaybeBoost Hash Library: Rationale

The seed for this library came back during the Boost.UUID review. For random-based UUIDs, Boost.Random had defined the necessary concepts to implement a useful basic_random_generator, but for name-based UUIDs there was no hash concept available. As a result, Boost.UUID currently includes an SHA-1 implementation, but cannot provide the MD5-based UUIDs described by RFC 4122.

On the implementation side, hash algorithms are build out of smaller components (see, for instance, the Davies-Meyer and Merkle-Damgård constructions) in a way which provides for an elegant generic implementation. Generic programming also allows them to accept a wide range of input sizes, instead of just allowing byte-oriented input like the vast majority of other implementations.

Previous: Validation


Copyright Scott McMurray 2010

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt).