24 lines
No EOL
3.3 KiB
HTML
24 lines
No EOL
3.3 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>Hash — Ludic</title>
|
||
<meta name="description" content="Fast, non-cryptographic hashing for everyday game needs: turning string IDs into integer handles, mixing a few numbers into one deterministic seed, and…">
|
||
<link rel="stylesheet" href="base.css">
|
||
<link rel="stylesheet" href="docs.css">
|
||
</head>
|
||
<body>
|
||
<header class="nav"><div class="wrap nav-in"><a class="brand" href="index.html"><span class="logo">L</span> Ludic</a><button class="nav-toggle" aria-label="Toggle menu" aria-expanded="false">☰</button><nav class="nav-links"><a href="index.html">Home</a><a href="api.html">API Reference</a><a class="nav-cta" href="https://git.workshopsoft.io/workshopsoft/ludic">Source ↗</a></nav></div></header>
|
||
<main class="wrap item">
|
||
<div class="crumbs"><a href="api.html">API Reference</a> <span>›</span> <span class="here">Hash</span></div>
|
||
<div class="item-head"><span class="kind-badge kind-namespace">namespace</span><h1 id="top">Hash</h1></div>
|
||
<p class="ns-blurb">Fast, non-cryptographic hashing for everyday game needs: turning string IDs into integer handles, mixing a few numbers into one deterministic seed, and checksumming data to catch corruption. Every function is plain 32-bit integer arithmetic with a defined byte order and fixed constants, so a given input hashes to exactly the same value on every platform and every run — the guarantee that makes it safe for procedural generation and lockstep networking. Results are 32-bit and print as signed integers. Arguments are positional.
|
||
|
||
Not for security. These hashes are fast and reversible — never use them for passwords, tokens, or tamper-proofing. For secure hashing reach for the cryptography library instead.</p>
|
||
<div class="ns-methods"><a class="ns-method" href="hash-of.html"><code class="nm-sig">Hash.of(s) -> int</code><span class="nm-tip">The fast default string hash.</span></a><a class="ns-method" href="hash-fnv1a.html"><code class="nm-sig">Hash.fnv1a(s) -> int</code><span class="nm-tip">FNV-1a 32-bit, named explicitly.</span></a><a class="ns-method" href="hash-crc32.html"><code class="nm-sig">Hash.crc32(s) -> int</code><span class="nm-tip">CRC-32 checksum for corruption detection.</span></a><a class="ns-method" href="hash-mix.html"><code class="nm-sig">Hash.mix(x) -> int</code><span class="nm-tip">Avalanche one integer into a well-scrambled value.</span></a><a class="ns-method" href="hash-combine.html"><code class="nm-sig">Hash.combine(...) -> int</code><span class="nm-tip">Fold several ints into one deterministic seed.</span></a><a class="ns-method" href="hash-of64.html"><code class="nm-sig">Hash.of64(s) -> long</code><span class="nm-tip">The fast default 64-bit string hash.</span></a><a class="ns-method" href="hash-fnv1a_64.html"><code class="nm-sig">Hash.fnv1a_64(s) -> long</code><span class="nm-tip">FNV-1a 64-bit, named explicitly.</span></a><a class="ns-method" href="hash-mix64.html"><code class="nm-sig">Hash.mix64(x) -> long</code><span class="nm-tip">Avalanche one 64-bit integer into a well-scrambled value.</span></a></div>
|
||
<a class="back" href="api.html">← All symbols</a>
|
||
</main>
|
||
<script src="ludic-highlight.js"></script>
|
||
<script>Ludic.installCards(); Ludic.flashTarget();</script>
|
||
</body></html> |