Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

hfnv

claudiuandrei374MIT1.0.3TypeScript support: included

FNV-1a 128 hashing

hash, hashing, fnv, fnv-1a, 128, fnv 128, base64, base36, base64url

readme

Hfnv

FNV-1a 128bit hashing utility with no external dependencies

Hfnv is a functional FNV-1a 128bit hashing utility written in TypeScript. It runs in the browser, or on the server using node.js.

Setup

yarn add hfnv

or

npm install --save hfnv

Usage

Before you start import the functions from the library

import { digest, hex, base64, base64Url, base36 } from 'hfnv'

Basic usage

// Create random UUIDs
const hash = digest('qwerty')

// Create the output
hex(hash) // 24ac7f403a3c64bf6f48c2b048d6ae31
base64(hash) // JKx/QDo8ZL9vSMKwSNauMQ==
base64Url(hash) // JKx_QDo8ZL9vSMKwSNauMQ
base36(hash) // 265uihu41nkeln5blxxfzjb5d

License

MIT