library token
PHP library to generate random strings
sinergi/token
PHP library to generate random strings
- Saturday, May 24, 2014
- by sinergi
- Repository
- 2 Watchers
- 11 Stars
- 3,882 Installations
- PHP
- 9 Dependents
- 0 Suggesters
- 3 Forks
- 0 Open issues
- 2 Versions
- 6 % Grown
Token
, (*1)
A handful of tools for PHP developers., (*2)
, (*3)
Requirements
This library uses PHP 5.4+., (*4)
, (*5)
Installation
It is recommended that you install the Token library through composer. To do so, add the following lines to your composer.json file., (*6)
{
"require": {
"sinergi/token": "dev-master"
}
}
, (*7)
Usage
use Sinergi\Token\StringGenerator;
StringGenerator::randomAlnum(32);
Methods
-
randomAlnum Generate alpha-numeric string, (*8)
- Parameters
-
int $length The length of the string to generate
-
Optional
bool $onlyUppercase Use only uppercase letters
-
randomAlpha Generate alpha string, (*9)
- Parameters
-
int $length The length of the string to generate
-
Optional
bool $onlyUppercase Use only uppercase letters
-
randomNumeric Generate numeric string, (*10)
- Parameters
-
int $length The length of the string to generate
-
randomHexa Generate hexa string, (*11)
- Parameters
-
int $length The length of the string to generate
-
randomUuid Generate uuid string, (*12)
-
randomId Generate id string, (*13)
dev-master
9999999-dev
PHP library to generate random strings
Sources
Download
MIT
The Requires
The Development Requires
php
uuid
token
string
id
random
hexa
0.1.0
0.1.0.0
PHP library to generate random strings
Sources
Download
MIT
The Requires
The Development Requires
php
uuid
token
string
id
random
hexa