https://github.com/venkatperi/node-apikey
Nodejs module for generating base62 API keys.
https://github.com/venkatperi/node-apikey
Last synced: 2 months ago
JSON representation
Nodejs module for generating base62 API keys.
- Host: GitHub
- URL: https://github.com/venkatperi/node-apikey
- Owner: venkatperi
- Created: 2015-08-21T20:46:15.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-30T16:11:13.000Z (over 8 years ago)
- Last Synced: 2025-03-11T21:48:05.003Z (3 months ago)
- Language: CoffeeScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API Key
Nodejs module for generating ```base62``` API keys.
## Install
$ npm install apikeygen
## Usagevar apikey = require("apikeygen").apikey;
var key = apikey(); // generates 40 char base64 encoded key
### Key Length
The default key length is 40 chars. To change this, call ```apikey``` with the
new key lengthvar key = apikey(30);
## Dependencies
Internally, ```apikey``` uses ```crypto.randomBytes()```.
## Testsnpm test