Socket
Socket
Sign inDemoInstall

uuid-apikey

Package Overview
Dependencies
4
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.4 to 1.4.5

0

.eslintrc.json

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

17

package.json
{
"name": "uuid-apikey",
"version": "1.4.4",
"version": "1.4.5",
"description": "A Base32-Crockford encoded API Key generator, validator, and converter to turn UUIDs into human readable API Keys",

@@ -21,2 +21,5 @@ "main": "index.js",

},
"publishConfig": {
"access": "public"
},
"keywords": [

@@ -36,8 +39,8 @@ "uuid",

"codacy-coverage": "^3.4.0",
"eslint": "^6.2.2",
"eslint": "^6.5.1",
"gulp": "^4.0.2",
"gulp-eslint": "^6.0.0",
"gulp-mocha": "^7.0.1",
"gulp-prettier": "^2.1.0",
"mocha": "^6.2.0",
"gulp-mocha": "^7.0.2",
"gulp-prettier": "^2.2.0",
"mocha": "^6.2.2",
"nyc": "^14.1.1",

@@ -47,4 +50,4 @@ "prettier": "^1.18.2"

"dependencies": {
"colors": "^1.3.3",
"commander": "^3.0.0",
"colors": "^1.4.0",
"commander": "^3.0.2",
"encode32": "^1.1.0",

@@ -51,0 +54,0 @@ "uuid": "^3.3.3"

@@ -12,12 +12,26 @@ # uuid-apikey

*"API Keys for people"*
*"API Keys are for people"*
A generator, validator, and converter that transforms UUIDs into human-readable Base32-Crockford encoded API Keys.
This module is a generator, validator, and converter that transforms UUIDs into human-readable Base32-Crockford encoded API Keys.
* API Keys are 31 characters in length consisting of 4 groups of 7 characters separated by dashes *(e.g. XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX)*
* They avoids the problem that Base64 encoded values can create, such as:
* API Keys are entirely in upper-case, but treat lower-case values as their upper-case counterparts *(e.g. a ≡ A)*
* API Keys do not use tricky characters (i.e. the letter O, the letter L, and the letter I), but treat them equivalently with other characters they could be confused for *(i.e. 0 ≡ O ≡ o / 1 ≡ L ≡ I ≡ l ≡ i )*
* API Keys omit letters which could inadvertently lead to common profanities *(i.e. the letter U)*
It turns this:
```
9b3ac4c9-0228-4e42-a244-927059b1a5ea
```
into this:
```
KCXC9JD-08M4WGH-M9294W1-B6RTBTH
```
## Notes about Base32-Crockford API Keys
* API Keys are 31 characters in length and consist of 4 groups of 7 characters separated by dashes *(e.g. XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX)*
* API Keys are ideal for readable transports where they may be manually entered by a human and fonts may cause confusion.
For example, Base64 encoded values can be problematic when a human tried to type them in and Base32-Crockford API Keys avoid this by doing the following:
* API Keys have no lower case values. The API Key parser handles all lower-case values as their upper-case equivalent. *(e.g. `a` ≡ `A`)*
* API Keys do not use tricky characters that can be confused in some fonts. The parser handled confusing characters as the same value.
* the letters `O`, `o`, and the number `0`
* the letters `L`, `l`, `I`, `i`, and the number `1`
* API Keys do not use the letter `U` which could inadvertently lead to common English profanities.
## Common Uses

@@ -24,0 +38,0 @@ * Generating and using REST API Keys where a UUID is stored in a host DB but the API Key is shown to the user.

@@ -0,0 +0,0 @@ const chai = require('chai');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc