polidore / hash-cache-node

Create string hashes with a transparent cache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Background

I wanted a library that I could use to name things with MD5 hash strings. It would ask for the same hash a lot and it needed to be fast.

Usage

var Hache = require('hache');
var hache = new Hache('md5');

var hash = hache.encode('randomString'); //generates
var hashFromCache = hache.encode('randomString'); //serves from memory

Assumptions

You only want strings

About

Create string hashes with a transparent cache

License:MIT License


Languages

Language:JavaScript 100.0%