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)
1910900107639023641

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

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

On this page