hash/blake2: update namespace for size_type trait

This commit is contained in:
Danny Robson 2020-12-06 08:40:46 +10:00
parent 229b3d3f1a
commit e06d7b381f

View File

@ -11,7 +11,7 @@
#include <cruft/util/bitwise.hpp> #include <cruft/util/bitwise.hpp>
#include <cruft/util/debug/assert.hpp> #include <cruft/util/debug/assert.hpp>
#include <cruft/util/endian.hpp> #include <cruft/util/endian.hpp>
#include <cruft/util/types.hpp> #include <cruft/util/types/sized.hpp>
using cruft::crypto::hash::blake2; using cruft::crypto::hash::blake2;
@ -20,7 +20,7 @@ using cruft::crypto::hash::blake2;
// blake2b: u64 // blake2b: u64
struct traits { struct traits {
static constexpr int word_bits = 64; static constexpr int word_bits = 64;
using word_t = typename cruft::bits_type<word_bits>::uint; using word_t = typename cruft::types::sized::bits<word_bits>::uint;
static constexpr int F_rounds = 12; static constexpr int F_rounds = 12;
static constexpr int block_bytes = 128; // bb static constexpr int block_bytes = 128; // bb
static constexpr int max_hash_bytes = 64; // nn static constexpr int max_hash_bytes = 64; // nn