yalesov / password-generate
Password generator
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:JavaScript
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-12-21 20:46:44 UTC
README
Password generators.
Based on actual use cases encountered in the wild.
mixed
: (alpha) + (num) + (symbol)alphanum
: some systems don't allow symbolsnum
: primarily those intended for phone usage
Usage
Naked
lib/* mode length lib/* mode lib/* length lib/* mode = m[ixed]|a[lphanum]|n[um] ; default mixed length = (integer >= 3) ; default = 12
npm
npm install password-generate
let PasswordGenerate = require('password-generate') console.log(PasswordGenerate.generate(mode, length)) console.log(PasswordGenerate.generate(mode)) console.log(PasswordGenerate.generate(length)) console.log(PasswordGenerate.generate())
gem
gem install password_generate
require 'password_generate' p PasswordGenerate.generate mode, length p PasswordGenerate.generate mode p PasswordGenerate.generate length p PasswordGenerate.generate
composer
composer require yalesov/password-generate
use password_generate\PasswordGenerate; echo PasswordGenerate::generate($mode, $length); echo PasswordGenerate::generate($mode); echo PasswordGenerate::generate($length); echo PasswordGenerate::generate();
bash
./password-generate.sh mode length ./password-generate.sh mode ./password-generate.sh length ./password-generate.sh
perl
./password-generate.pl mode length ./password-generate.pl mode ./password-generate.pl length ./password-generate.pl
Notes
Symbol
Only using the underscore _
.
Some don't allow fancier symbols, but the underscore seems accepted everywhere.
Alpha
Assuming both uppercase and lowercase allowed.
The only contrary case I have seen is banks, which uses case-insensitive passwords - but then it doesn't disallow inputting both upper- and lower- case either.
Num
Ever-present.
I haven't seen a system that disallow numeric inputs yet.
First character
Is always an alpha
.
Systems have various rules disallowing what is or is not allowed, but the alpha seems accepted everywhere.