1.0.1 • Published 6 years ago

sb-hashedstore v1.0.1

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

sebas - HashedStore

NodeJS hash store package for the sebas project.

features

This is a simple hash function which provides a chars5 in hex format.

  • Consistent - all hashed values are stored in an object and will return the same hash for the same value
  • Fast - hashed values are randomly generated hex chars joined so it doesn't perform any complex arithmetic computations

Hashed values are not shared between multiple instance of HashedStore. You can have multiple hashed store instances:

const hashedStore1 = new HashedStore
const hashedStore2 = new HashedStore

Each HashedStore instance can only store up to 1048576 (16^5) hashed values and will return a hashed value of 'error' once it has exceed the maximum value.

usage

const HashedStore = require('sb-hashedstore')
const hashedStore = new HashedStore

const hashed = hashedStore.hash('something')

license

MIT