Skip to content
/ xxhash64 Public

A fast, simple xxHash64 implementation in TypeScript/WASM.

License

Notifications You must be signed in to change notification settings

jabr/xxhash64

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

xxHash64

A fast, simple xxHash64 implementation in TypeScript/WASM.

Example

import * as XXH64 from "./mod.ts"

let h = await XXH64.create()
h.update('abc')
h.digest() // #=> Uint8Array(8) [ 68, 188, ... ]
h.digest('bigint') // #=> 11027476751619767364n
h.digest('hex') // #=> "990977adf52cbc44"

// Continue updating/digesting a hash...
h.update('xyz').digest('hex') // #=> "8309bfe8354a4319"
h.update('xyz').digest('hex') // #=> "0f96ca82f6748457"

// Reset to generate a new hash:
h.reset().update('xyz').digest('hex') // #=> "a13c835b4648bafe"

// Combine reset/update/digest in one call:
h.hash('xyz', 'hex') // #=> "a13c835b4648bafe"

References

License

This project is licensed under the terms of the MIT license and others.

About

A fast, simple xxHash64 implementation in TypeScript/WASM.

Resources

License

Stars

Watchers

Forks

Packages

No packages published