iwalkalone / random
There is no license information available for the latest version (dev-master) of this package.
dev-master
2017-03-19 22:36 UTC
This package is auto-updated.
Last update: 2024-09-06 09:53:16 UTC
README
It is a simple class to generate random alpha numeric strings to generate things like apikeys, passwords or recovery codes.
\iwalkalone\Random::generate($length, $type);
Allowed types are:
- n: only numbers (0-9).
- A: only capital letters (A-Z, except O to avoid confusion with number 0).
- a: only lowercase letters (a-z, except l to avoid confusion with number 1).
- An: capital letters and numbers (except letter O to avoid confusion with number 0).
- an: lowercase letters and numbers (except letters i and number 1 to avoid confusions).
- Aan: uppercase and lowercase letters plus numbers (except letter O and number 1).
By default, length is 8 and type is Aan.