#include <picosha2.h>
Definition at line 184 of file picosha2.h.
◆ hash256_one_by_one()
picosha2::hash256_one_by_one::hash256_one_by_one |
( |
| ) |
|
|
inline |
◆ add_to_data_length()
void picosha2::hash256_one_by_one::add_to_data_length |
( |
word_t |
n | ) |
|
|
inlineprivate |
Definition at line 238 of file picosha2.h.
242 for (std::size_t
i = 0;
i < 4; ++
i) {
◆ finish()
void picosha2::hash256_one_by_one::finish |
( |
| ) |
|
|
inline |
Definition at line 207 of file picosha2.h.
213 temp[remains] = 0x80;
216 std::fill(temp + remains + 1, temp + 64, 0);
220 std::fill(temp + remains + 1, temp + 64 - 4, 0);
◆ get_hash_bytes()
template<typename OutIter >
void picosha2::hash256_one_by_one::get_hash_bytes |
( |
OutIter |
first, |
|
|
OutIter |
last |
|
) |
| const |
|
inline |
Definition at line 228 of file picosha2.h.
230 for (std::size_t
i = 0;
i < 4 &&
first != last; ++
i) {
232 static_cast<byte_t>((*iter >> (24 - 8 *
i))));
◆ init()
void picosha2::hash256_one_by_one::init |
( |
| ) |
|
|
inline |
◆ process()
template<typename RaIter >
void picosha2::hash256_one_by_one::process |
( |
RaIter |
first, |
|
|
RaIter |
last |
|
) |
| |
|
inline |
◆ write_data_bit_length()
void picosha2::hash256_one_by_one::write_data_bit_length |
( |
byte_t * |
begin | ) |
|
|
inlineprivate |
Definition at line 253 of file picosha2.h.
254 word_t data_bit_length_digits[4];
257 data_bit_length_digits);
261 for (std::size_t
i = 0;
i < 4; ++
i) {
262 word_t before_val = data_bit_length_digits[
i];
263 data_bit_length_digits[
i] <<= 3;
264 data_bit_length_digits[
i] |= carry;
265 data_bit_length_digits[
i] &= 65535
u;
266 carry = (before_val >> (16 - 3)) & 65535
u;
270 for (
int i = 3;
i >= 0; --
i) {
271 (*
begin++) =
static_cast<byte_t>(data_bit_length_digits[
i] >> 8);
272 (*
begin++) =
static_cast<byte_t>(data_bit_length_digits[
i]);
◆ m_buffer_
std::vector<byte_t> picosha2::hash256_one_by_one::m_buffer_ |
|
private |
◆ m_data_length_digits_
word_t picosha2::hash256_one_by_one::m_data_length_digits_[4] |
|
private |
◆ m_h_
word_t picosha2::hash256_one_by_one::m_h_[8] |
|
private |
The documentation for this class was generated from the following file: