952 days continuous production uptime, 40k+ tp/s single node. Original corpo Bitbucket history not included — clean archive commit.
32 lines
968 B
PHP
32 lines
968 B
PHP
<?php
|
|
require_once(dirname(__DIR__) . '/config/sneakerstrap.inc');
|
|
|
|
$x = md5('einstein'); // this will hash to the same value every time
|
|
echo 'md5: ' . $x . PHP_EOL;
|
|
$y = password_hash($x, PASSWORD_ARGON2I); // this hashes differently every time b/c the salt is auto generated
|
|
echo PHP_EOL . 'hash: ' . PHP_EOL;
|
|
echo $y . PHP_EOL;
|
|
if (password_verify($x, $y))
|
|
echo 'passwords match' . PHP_EOL;
|
|
else
|
|
echo 'Passwords do not match' . PHP_EOL;
|
|
|
|
$email = 'captain@serenity.space';
|
|
$token = '10F00599-F8DA-ADF3-7033-7A1CACF2879D';
|
|
$meta = [
|
|
META_TEMPLATE => TEMPLATE_CLASS_USERS,
|
|
META_CLIENT => CLIENT_API_USER,
|
|
META_DO_CACHE => 0,
|
|
CLIENT_AUTH_TOKEN => '136EA67A-B1E2-0A4B-2BD8-EE34D39DFDE1',
|
|
META_EVENT_GUID => guid(),
|
|
|
|
];
|
|
$obj = new gacUsers($meta);
|
|
if (!$obj->status)
|
|
exit(ERROR_TEMPLATE_INSTANTIATE . TEMPLATE_CLASS_USERS);
|
|
|
|
$results = $obj->hashCheck($email, $x);
|
|
echo PHP_EOL;
|
|
var_export($results);
|
|
echo PHP_EOL;
|