Simple key generation tool written in node.js using Hmac algorithm


A lightweight node.js key generation app.

Note There are 3 possible env vars that can be set in order to customise to suit your needs:

  • process.env.APP_SALT
  • process.env.APP_ENCRYPTION
  • process.env.APP_ENCODING

Default values are used if these aren't set and they can be found in config/config.js.

Prior to setting the env vars I encourage you to read on [crypto] ( from the node.js documentation and especially on Hmac class which is used in generating the key here.

$ npm install key-gen
var keyGen = require('key-gen');
var options = {
  prefix: ['identifier1', 'identifier2', 'identifier3'],
  data: {
    data1: 'data1',
    data2: 'data2',
    data3: 'data3'
var key = keyGen.generate(options);

Provided the default config values remain unchanged the above key will equal:


$ make test

Released fully under [MIT license] (