Reference · Number-puzzle engines
kazuHashfunction
A short fingerprint of a puzzle's givens (FNV-1a, eight hex characters): the same puzzle, however it was kept, has the same one. Not a credential.
Import it
import { kazuHash } from "@johnmorrisdotca/kazu";
Definition
function kazuHash(givens: string): string
Parameters
| Name | Type | Description |
|---|---|---|
givens | string | The original native printed-clue code. |
Returns
string
A short fingerprint of a puzzle's givens (FNV-1a, eight hex characters): the same puzzle, however it was kept, has the same one. Not a credential.
Examples
import type { KazuPuzzle } from "@johnmorrisdotca/kazu";
import { kazuHash } from "@johnmorrisdotca/kazu";
const puzzle: KazuPuzzle = {"kind":"number-place","size":4,"level":"easy","seed":42,"givens":"14..2..1412.3..4","solution":"1432234141233214"};
const givens = puzzle.givens;
console.log(kazuHash(givens));f7ce65f1What it prints (run when this page was built)