Berserk Docs
Scalar FunctionsHash Functions

hash_combine

Combines hash values of two or more hashes into a single hash value.

Syntax

hash_combine(h1)

Parameters

Prop

Type

Returns: long

Examples

Example 1 — Combine two pre-computed hashes

print hash_combine(hash("Ragnar"), hash("Lothbrok"))
print_0 (long)
6932643916990563477

Example 2 — Combine three hashes — ship, target, and year

print hash_combine(hash("Naglfar"), hash("Lindisfarne"), hash(793))
print_0 (long)
8443409495930502267

On this page