diff options
Diffstat (limited to 'tests/register.php')
| -rw-r--r-- | tests/register.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/register.php b/tests/register.php new file mode 100644 index 0000000..7f778af --- /dev/null +++ b/tests/register.php @@ -0,0 +1,43 @@ +<?php +$userManager = new UserManager(); + +$password = $userManager->cryptPassword('102030!!!'); + +$user = (new User()) + ->setUserName('geo@roptron.gr') + ->setPassword($password) + ->setRoles([1]); + +$userManager->createUserToken($user); + + +$algos = [ + password_hash('root1234', PASSWORD_DEFAULT, ['cost' => 10 ]), + password_hash('root1234', PASSWORD_ARGON2I, ['cost' => 10 ]), + password_hash('root1234', CRYPT_BLOWFISH, ['cost' => 10 ]), + password_hash('root1234', PASSWORD_DEFAULT, ['cost' => 9 ]), + password_hash('root1234', PASSWORD_ARGON2I, ['cost' => 9 ]), + password_hash('root1234', CRYPT_BLOWFISH, ['cost' => 9 ]), + password_hash('root1234', PASSWORD_DEFAULT, ['cost' => 11 ]), + password_hash('root1234', PASSWORD_ARGON2I, ['cost' => 11 ]), + password_hash('root1234', CRYPT_BLOWFISH, ['cost' => 11 ]), + password_hash('root1234', PASSWORD_DEFAULT, ['cost' => 12 ]), + password_hash('root1234', PASSWORD_ARGON2I, ['cost' => 12 ]), + password_hash('root1234', CRYPT_BLOWFISH, ['cost' => 12 ]), + password_hash('root1234', PASSWORD_DEFAULT, ['cost' => 8 ]), + password_hash('root1234', PASSWORD_ARGON2I, ['cost' => 8 ]), + password_hash('root1234', CRYPT_BLOWFISH, ['cost' => 8 ]), + password_hash('root1234', PASSWORD_DEFAULT, ['cost' => 7 ]), + password_hash('root1234', PASSWORD_ARGON2I, ['cost' => 7 ]), + password_hash('root1234', CRYPT_BLOWFISH, ['cost' => 7 ]) + +] +?><pre><?php + +foreach($algos as $a) { + echo $a ."\n"; +} + + + +?></pre>
\ No newline at end of file |
