SMMP/test/testHashChain.php

25 lines
450 B
PHP

<?php define('__ROOT__', dirname(dirname(__FILE__)) );
require_once __ROOT__.'/manager/autoloader.php';
debug();
use \manager\sessionManager;
$hash = 'password';
$times = 10000;
$start = microtime(true);
$hashed = sessionManager::secure_hash($hash, $times);
$stop = microtime(true);
var_dump( $hashed );
$elapsed = ($stop-$start)/1000;
var_dump('time: '. $elapsed . ' ms');
var_dump('hash/sec: '. $elapsed/$times . ' ms');
?>