1.0.2 • Published 9 months ago

passtix v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

Passtix

Passtix NPM

Passtix is a simple password generator.

Install

$ npm install passtix --save

Usage

generate([options])

Generate a password. It will returns a string.

const passtix = require('passtix');

var password = passtix.generate({
	length: 10
})

// "wE(20h>oGmwhN,m"
console.log(password);

entropy(password)

Calculates the amount of entropy of a password based on the following formula: E = L × log(R) / log(2) L - Password length R - Size of the pool of unique characters

const passtix = require('passtix');

var entropyLevel = passtix.entropy("wE(20h>oGmwhN,m")

// 99
console.log(entropyLevel)

It will returns a integer number.

Available options

Any of these can be passed into the options object for each function.

NameDescriptionDefault Value
lengthInteger, length of password.15
1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago