Add hardened_hash to basics/:

xxhasher is the default hash function for hardened_hash.
This commit is contained in:
Vinnie Falco
2015-01-16 14:11:54 -08:00
parent 6ab1ecd836
commit 53a16f354f
15 changed files with 520 additions and 23 deletions

View File

@@ -28,8 +28,7 @@
#include <ripple/basics/ByteOrder.h>
#include <ripple/basics/Blob.h>
#include <ripple/basics/strHex.h>
#include <beast/hash/hardened_hash.h>
#include <ripple/basics/hardened_hash.h>
#include <beast/utility/Zero.h>
#include <boost/functional/hash.hpp>
@@ -98,7 +97,7 @@ public:
/** Value hashing function.
The seed prevents crafted inputs from causing degenarate parent containers.
*/
typedef beast::hardened_hash <> hasher;
typedef hardened_hash <> hasher;
/** Container equality testing function. */
class key_equal
@@ -537,7 +536,7 @@ struct hash<ripple::base_uint<Bits, Tag>>
std::size_t
operator()(argument_type const& u) const
{
return beast::hardened_hash<>{}(u);
return ripple::hardened_hash<>{}(u);
}
};