Last active
April 18, 2018 08:10
-
-
Save gladchinda/a7b254f0ba6840128991f0f7a4906970 to your computer and use it in GitHub Desktop.
Code to test PHP Keygen package installation by just generating some random keys.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require __DIR__ . '/vendor/autoload.php'; | |
use Keygen\Keygen; | |
$id_12 = Keygen::numeric(12)->generate(); | |
$id_16 = Keygen::numeric()->generate(); | |
$alnum = Keygen::alphanum(15)->generate(); | |
$token = Keygen::token(28)->generate(); | |
$bytes = Keygen::bytes(20)->generate(); | |
$hex = Keygen::bytes(20)->hex()->generate(); | |
echo $id_12; // 011683218639 | |
echo $id_16; // 9352941287643963 | |
echo $alnum; // TFd5X74Pr9ZOiG2 | |
echo $token; // 4HE1xQz+4ks0Td128KSO/kBivd79 | |
echo $bytes; // (some random byte chars) | |
echo $hex; // 9f802a80aaf4b5e89e14 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment