UNPKG

@emartech/faye-redis-sharded

Version:

Redis backend engine for Faye with support for sharding

11 lines (8 loc) 255 B
var crypto = require('crypto'); function CryptoHash(algorithm){ this.algorithm = algorithm || 'md5'; } CryptoHash.prototype.getHash = function(key){ return crypto.createHash(this.algorithm).update(key).digest('hex'); }; module.exports = CryptoHash;