Fix the build time implementation of tiger hash.

Result for "message digest", "abc" and "" are correct.
This commit is contained in:
King_DuckZ 2015-06-23 01:29:40 +02:00
commit 6a39b82e5e
2 changed files with 26 additions and 2 deletions

View file

@ -425,7 +425,7 @@ namespace dk {
constexpr HashType tiger_block (const TigerBlock& parBlock, HashType parHash) {
return finalize_tiger_step(
parHash,
pass(1, 2, 0, 9, key_sched(parBlock),
pass(1, 2, 0, 9, key_sched(key_sched(parBlock)),
pass(2, 0, 1, 7, key_sched(parBlock),
pass(0, 1, 2, 5, parBlock, parHash)
)
@ -467,7 +467,7 @@ namespace dk {
parLen,
implem::tiger_chunk(
parStr,
parLen bitand static_cast<uint64_t>(-64),
parLen bitand ~static_cast<uint64_t>(0x3f),
HashType(0x0123456789ABCDEFULL, 0xFEDCBA9876543210ULL, 0xF096A5B4C3B2E187ULL)
),
parPad