Download the PHP package zeraphie/passwordgen without Composer
On this page you can find all versions of the php package zeraphie/passwordgen. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zeraphie/passwordgen
More information about zeraphie/passwordgen
Files in zeraphie/passwordgen
Package passwordgen
Short Description A simple password generation class
License MIT
Informations about the package passwordgen
PasswordGen
A simple class for cryptographically strong secure password generation
Installation - Composer
This class is available as a package using composer, just run
Javascript
This also comes as an bower package written in javascript, compiled with gulp as it uses ES2015 for a class structure and thusly has almost exactly the same usage
To install it, run
Usage
Setup
PHP
Javascript
Simply add the build/master.js file to your build tool or add the file directly into your html and it will be ready to be used as below
Basic
PHP
JavaScript
Changing the length
PHP
JavaScript
Changing the keyspace
PHP
JavaScript
Generating a keyspace
PHP
JavaScript
Changing length and generating keyspace
PHP
JavaScript
Note: The two setters are independent of each other so don't need to be in order
Note 2: Since the javascript version utilizes static getters, you can simply use (as an example to see the character sets used in the generator) PasswordGen.CHARACTERSETS
in order to see what the properties of the class are.
You can also use PasswordGen.arrayKeySearch(needles, haystack)
and PasswordGen.randomInteger(min, max)
Character Groups
Group | Variable | Letter |
---|---|---|
LOWERCASELETTERS | 'abcdefghijklmnopqrstuvwxyz' | l |
UPPERCASELETTERS | 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | u |
NUMBERS | '1234567890' | n |
SPECIALCHARACTERS | '!@#$%&*?,./|[]{}()' | s |
WHITESPACE | ' ' | w |