🎲 Crypto secure salt generator
Coded with ❤️ by Simone Primarosa.
Promise.<Buffer>
Generates a cryptographically secure random string to be used as a password salt
, using Node's built-in crypto.randomBytes() function.
**Kind**: global function
**Returns**: Promise.<Buffer> - The salt as a Buffer.
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| length | number | The length of the salt to be generated. Must be an integer within the range (`0` <= `length` <= `2^31-1`). |
## Contributing
Contributions are REALLY welcome and if you find a security flaw in this code, PLEASE [report it][new issue].
## Authors
- **Simone Primarosa** - *Github* ([@simonepri][github:simonepri]) • *Twitter* ([@simoneprimarosa][twitter:simoneprimarosa])
See also the list of [contributors][contributors] who participated in this project.
## License
This project is licensed under the MIT License - see the [license][license] file for details.
[new issue]: https://github.com/simonepri/node-kdf/issues/new
[contributors]: https://github.com/simonepri/node-kdf/contributors
[license]: https://github.com/simonepri/node-kdf/blob/master/packages/salt/license
[github:simonepri]: https://github.com/simonepri
[twitter:simoneprimarosa]: http://twitter.com/intent/user?screen_name=simoneprimarosa