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 2ef8038..053a020 100644 --- a/include/nil/crypto3/hash/block_to_field_elements_wrapper.hpp +++ b/include/nil/crypto3/hash/block_to_field_elements_wrapper.hpp @@ -100,13 +100,12 @@ namespace nil { if (element_filled_) { return; } - value_type field_element = value_type::zero(); + field_element_ = value_type::zero(); 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.data <<= input_value_bits_; // TODO: add shift operators to field values - field_element += *tmp_iter++; + field_element_.data <<= input_value_bits_; // TODO: add shift operators to field values + field_element_ += uint64_t(*tmp_iter++); } - field_element_ = field_element; element_filled_ = true; }