// hash to get const result.
uint32_t final_hash = AltHashing::halfsiphash_32(0, hashes, factor*256);
// Value found using reference implementation for the hashes array. //uint64_t k = 0; // seed //uint32_t reference; //halfsiphash((const uint8_t*)hashes, factor*256, (const uint8_t *)&k, (uint8_t*)&reference, 4); //printf("0x%x", reference);
// hash to get const result.
uint32_t final_hash = AltHashing::halfsiphash_32(0, hashes, factor*256);
// Value found using reference implementation for the hashes array. //uint64_t k = 0; // seed //uint32_t reference; //halfsiphash((const uint8_t*)hashes, 2*factor*256, (const uint8_t *)&k, (uint8_t*)&reference, 4); //printf("0x%x", reference);
ASSERT_EQ(HALFSIPHASH_32_CHAR_CHECK_VALUE, final_hash) <<
err_msg( "Calculated hash result not as expected. Expected " UINT32_FORMAT " got " UINT32_FORMAT,
HALFSIPHASH_32_CHAR_CHECK_VALUE,
final_hash);
}
// Test against sample hashes published with the reference implementation: // https://github.com/veorq/SipHash staticvoid testHalfsiphash_64_FromReference() {
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.