hash

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package hash provides EVR symbol hash functions.

Two hash algorithm families are used in EchoVR:

  • CSymbol64Hash: Case-insensitive CRC64 variant (polynomial 0x95ac9329ac4bc9b5). Used for replicated variable names, asset IDs, and general symbol hashing. Initial seed: 0xFFFFFFFFFFFFFFFF

  • SNSMessageHash: Two-stage pipeline for SNS protocol message type IDs. Stage 1: CMatSym_Hash (CRC64-ECMA-182, iterative) Stage 2: SMatSymData_HashA mixing with seed 0x6d451003fb4b172e

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CSymbol64Hash

func CSymbol64Hash(s string) uint64

CSymbol64Hash computes the CSymbol64 hash of a string. Case-insensitive: A-Z are folded to a-z before hashing. Initial seed: 0xFFFFFFFFFFFFFFFF Algorithm from 0x1400ce120 in echovr.exe.

func CSymbol64HashWithSeed

func CSymbol64HashWithSeed(s string, seed uint64) uint64

CSymbol64HashWithSeed is CSymbol64Hash with a custom initial seed.

func SNSMessageHash

func SNSMessageHash(s string) uint64

SNSMessageHash computes the SNS message type hash for a protocol message name. Used to identify the 61 SNS message types in the matchmaking protocol.

The leading 'S' prefix is stripped before hashing — confirmed across 3 registration functions in echovr.exe (broadcaster, lobby, profile, smite messages):

"SNSLobbySmiteEntrant"          → CMatSym_Hash("NSLobbySmiteEntrant")
"SBroadcasterIntroduceFinEvent" → CMatSym_Hash("BroadcasterIntroduceFinEvent")

Algorithm: CMatSym_Hash(name[1:]) → SMatSymData_HashA(0x6d451003fb4b172e, result) Case-sensitive (unlike CSymbol64Hash).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL