hash/blake2: prefer std::array over bare arrays
This commit is contained in:
parent
a8f718f1d9
commit
bd940f0256
@ -69,8 +69,15 @@ sigma[12][16] {
|
||||
// mixing function
|
||||
static constexpr
|
||||
void
|
||||
G (word_t v[16], int a, int b, int c, int d, word_t x, word_t y)
|
||||
{
|
||||
G (
|
||||
std::array<word_t,16> &v,
|
||||
int const a,
|
||||
int const b,
|
||||
int const c,
|
||||
int const d,
|
||||
word_t x,
|
||||
word_t y
|
||||
) {
|
||||
|
||||
v[a] = v[a] + v[b] + x; v[d] = cruft::rotater (v[d] ^ v[a], traits::rotations[0]);
|
||||
v[c] = v[c] + v[d]; v[b] = cruft::rotater (v[b] ^ v[c], traits::rotations[1]);
|
||||
@ -84,7 +91,7 @@ G (word_t v[16], int a, int b, int c, int d, word_t x, word_t y)
|
||||
static void
|
||||
F (std::array<word_t,8> &h, const word_t m[16], u64 t, bool const f)
|
||||
{
|
||||
word_t v[16] {
|
||||
std::array<word_t,16> v {
|
||||
h[0], h[1], h[2], h[3], h[4], h[5], h[6], h[7],
|
||||
|
||||
traits::iv[0],
|
||||
|
Loading…
Reference in New Issue
Block a user