string-salt
v1.0.1
Published
A mechanism to salt strings when creating passwords
Downloads
13
Maintainers
Readme
string-salt
string-salt is a npm package that will help developers when creating passwords with salt mechanism.
Install
This is a Node.js module available through the
npm registry. Installation is done using the
npm install
command:
$ npm install string-salt
API
var salt = require('string-salt')
salt(string, times, salt)
This function needs three main arguments.
- string - the string or password that you want to salt
- times - the places that you will add salt string. The value of the times must be a integer. So,
- 1 = add salt string only to the front of the string
- 2 = add the salt string to front and back
- 3 = add salt string to front and back with twice
- 0 = return the salt string
- "" = will return the original password
- salt - the string or integer or whatever that you wish to have it as the salt string.