MD4: Difference between revisions
m
Minor improveents to coding.
m (Reformatting code.) |
m (Minor improveents to coding.) |
||
Line 590:
engine_update(string_to_byte_vector(text), 0, text.length());
const int32_t buffer_index =
const int32_t padding_length = ( buffer_index < 56 ) ? 56 - buffer_index : 120 - buffer_index;
Line 597:
for ( int32_t i = 0; i < 8; ++i ) {
tail[padding_length + i] = static_cast<int8_t>(
}
Line 605:
for ( int32_t i = 0; i < 4; ++i ) {
for ( int32_t j = 0; j < 4; ++j ) {
result[i * 4 + j] = static_cast<int8_t>(
}
}
Line 621:
}
int32_t buffer_index =
count += message_length;
const int32_t partial_length = BLOCK_LENGTH - buffer_index;
Line 686:
context[3] += d;
}
void engine_reset() {
count = 0;
Line 703:
std::transform(text.begin(), text.end(), std::back_inserter(bytes),
[](char ch){ return
return bytes;
Line 712:
return 0;
}
return ( base > 0 ) ? base >> shift : ( base +
}
Line 740:
const int32_t BLOCK_LENGTH = 64;
const int64_t TWO_POWER_32 = 4'294'967'296;
};
|