Skip to content

Commit

Permalink
Formatting code
Browse files Browse the repository at this point in the history
  • Loading branch information
refvalue committed Feb 14, 2025
1 parent c69396f commit 49d2999
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions include/ylt/util/sha3_detail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,21 +265,21 @@ inline constexpr auto step_mapping_rho_rotation_bits = [] {
*/
inline constexpr auto step_mapping_tau_rc_table =
[]<std::size_t... Is>(std::index_sequence<Is...>) {
constexpr auto func_rc = [](std::size_t round) {
// Let RC = 0w.
// For j from 0 to l = log2(w), let RC[2 ^ j – 1] = rc(j + 7ir).
word_type result = 0;

for (std::size_t i = 0; i <= log2_word_bits; i++) {
set_number_bit(result, (1 << i) - 1,
step_mapping_helper_rc(i + 7 * round));
}
constexpr auto func_rc = [](std::size_t round) {
// Let RC = 0w.
// For j from 0 to l = log2(w), let RC[2 ^ j – 1] = rc(j + 7ir).
word_type result = 0;

for (std::size_t i = 0; i <= log2_word_bits; i++) {
set_number_bit(result, (1 << i) - 1,
step_mapping_helper_rc(i + 7 * round));
}

return result;
};
return result;
};

return std::array<word_type, sizeof...(Is)>{func_rc(Is)...};
}
return std::array<word_type, sizeof...(Is)>{func_rc(Is)...};
}
(std::make_index_sequence<round_size>{});

/**
Expand Down

0 comments on commit 49d2999

Please sign in to comment.