hfnv
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    149
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    149
  • 1.0.2
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i hfnv

Weekly Downloads

150

Version

1.0.3

License

MIT

Unpacked Size

39.7 kB

Total Files

14

Last publish

Collaborators

  • claudiuandrei