#ifndef XRPL_BASICS_UNORDEREDCONTAINERS_H_INCLUDED #define XRPL_BASICS_UNORDEREDCONTAINERS_H_INCLUDED #include #include #include #include #include #include #include /** * Use hash_* containers for keys that do not need a cryptographically secure * hashing algorithm. * * Use hardened_hash_* containers for keys that do need a secure hashing * algorithm. * * The cryptographic security of containers where a hash function is used as a * template parameter depends entirely on that hash function and not at all on * what container it is. */ namespace ripple { // hash containers template < class Key, class Value, class Hash = beast::uhash<>, class Pred = std::equal_to, class Allocator = std::allocator>> using hash_map = std::unordered_map; template < class Key, class Value, class Hash = beast::uhash<>, class Pred = std::equal_to, class Allocator = std::allocator>> using hash_multimap = std::unordered_multimap; template < class Value, class Hash = beast::uhash<>, class Pred = std::equal_to, class Allocator = std::allocator> using hash_set = std::unordered_set; template < class Value, class Hash = beast::uhash<>, class Pred = std::equal_to, class Allocator = std::allocator> using hash_multiset = std::unordered_multiset; // hardened_hash containers using strong_hash = beast::xxhasher; template < class Key, class Value, class Hash = hardened_hash, class Pred = std::equal_to, class Allocator = std::allocator>> using hardened_hash_map = std::unordered_map; template < class Key, class Value, class Hash = hardened_hash, class Pred = std::equal_to, class Allocator = std::allocator>> using hardened_partitioned_hash_map = partitioned_unordered_map; template < class Key, class Value, class Hash = hardened_hash, class Pred = std::equal_to, class Allocator = std::allocator>> using hardened_hash_multimap = std::unordered_multimap; template < class Value, class Hash = hardened_hash, class Pred = std::equal_to, class Allocator = std::allocator> using hardened_hash_set = std::unordered_set; template < class Value, class Hash = hardened_hash, class Pred = std::equal_to, class Allocator = std::allocator> using hardened_hash_multiset = std::unordered_multiset; } // namespace ripple #endif