Socket
Socket
Sign inDemoInstall

generate-password

Package Overview
Dependencies
0
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.0 to 1.4.1

8

CHANGELOG.md

@@ -0,1 +1,7 @@

# 1.4.1 / 2018-10-28
Bug fix to `randomNumber()` function that reduced entropy, resulting in a bias towards letters, generally.
#### Notable Changes
- [`21a12d0fd`](https://github.com/brendanashworth/generate-password/commit/21a12d0fd47c1b8f63a310da052cedf29ba5c00d) - fixed randomNumber's frontwards bias (Starkteetje)
# 1.4.0 / 2018-1-20

@@ -36,2 +42,2 @@ Release that includes TypeScript definitions.

# 1.1.1 / 2014-12-23
- Add `excludeSimilarCharacters` option
- Add `excludeSimilarCharacters` option

2

package.json
{
"name": "generate-password",
"version": "1.4.0",
"version": "1.4.1",
"description": "Easy library for generating unique passwords.",

@@ -5,0 +5,0 @@ "main": "main.js",

@@ -8,3 +8,7 @@ var crypto = require('crypto');

// gives a number between 0 (inclusive) and max (exclusive)
return crypto.randomBytes(1)[0] % max;
var rand = crypto.randomBytes(1)[0];
while (rand >= 256 - (256 % max)) {
rand = crypto.randomBytes(1)[0];
}
return rand % max;
};

@@ -11,0 +15,0 @@

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