Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/frugal/packages/murmur/mod.ts>Hash

A frugal web framework
Go to Latest
class Hash
extends MurmurHash3
import { Hash } from "https://deno.land/x/frugal@0.5.0/packages/murmur/mod.ts";

Thin wrapper around MurmurHash3

Constructors

new
Hash(key?: string, seed?: number)

Methods

digest(type: "raw"): number

compute the digest of all data passed to the hash. The digest can either be:

  • 'raw', returning a 32-bit positive integer (the raw result of the mumrmurHash algorithm)
  • 'alphanumeric' (default), returning an alphanumeric string ([a-z0-9])
digest(type?: "alphanumeric"): string
update(data: string | Hash): Hash

update the hash content with the given data.