From 94cf3bf7310d235c145943608250e6946a24bfaf Mon Sep 17 00:00:00 2001 From: x-mass <36629999+x-mass@users.noreply.github.com> Date: Mon, 6 May 2024 11:46:17 +0000 Subject: [PATCH] Use native shift in block_to_field wrapper --- include/nil/crypto3/hash/block_to_field_elements_wrapper.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nil/crypto3/hash/block_to_field_elements_wrapper.hpp b/include/nil/crypto3/hash/block_to_field_elements_wrapper.hpp index eec989b..3204eed 100644 --- a/include/nil/crypto3/hash/block_to_field_elements_wrapper.hpp +++ b/include/nil/crypto3/hash/block_to_field_elements_wrapper.hpp @@ -104,7 +104,7 @@ namespace nil { std::size_t field_bits_left_ = Field::modulus_bits; auto tmp_iter = input_container_l_; for (std::size_t i = 0; i < container_elements_per_field_element_ && tmp_iter != input_container_r_; ++i) { - field_element *= 1 << input_value_bits_; // TODO: add shift operators to field values + field_element.data <<= input_value_bits_; // TODO: add shift operators to field values field_element += *tmp_iter++; field_bits_left_ -= input_value_bits_; }