Skip to content

Commit

Permalink
Make a number unsigned.
Browse files Browse the repository at this point in the history
  • Loading branch information
martun committed May 16, 2024
1 parent 24253d8 commit 9ff953d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/nil/crypto3/hash/block_to_field_elements_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9ff953d

Please sign in to comment.