Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shehand/string-salt
A npm package which will be useful for developers when salting passwords.
https://github.com/shehand/string-salt
Last synced: 19 days ago
JSON representation
A npm package which will be useful for developers when salting passwords.
- Host: GitHub
- URL: https://github.com/shehand/string-salt
- Owner: shehand
- License: mit
- Created: 2019-04-26T11:01:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-03T09:49:13.000Z (over 5 years ago)
- Last Synced: 2024-09-27T18:07:03.323Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://shehand.github.io/string-salt/
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):```sh
$ npm install string-salt
```## API
```js
var salt = require('string-salt')
```### salt(string, times, salt)
This function needs three main arguments.
1. string - the string or password that you want to salt
2. 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
3. salt - the string or integer or whatever that you wish to have it as the salt string.## License
[MIT](LICENSE)