SMMP/test/testHashChain.php

31 lines
412 B
PHP
Raw Normal View History

2016-07-04 13:45:29 +00:00
<?php define('__ROOT__', dirname(dirname(__FILE__)) );
require_once __ROOT__.'/manager/autoloader.php';
debug();
use \manager\sessionManager;
$hash = 'password';
2016-07-04 13:45:29 +00:00
$hashes = [];
for( $i = 0 ; $i < 1000 ; $i++ ){
$hash = sessionManager::secure_hash($hash);
2016-07-04 13:45:29 +00:00
if( isset($hashes[$hash]) )
2016-07-04 13:45:29 +00:00
var_dump('already');
$hashes[$hash] = null;
var_dump($hash);
2016-07-04 13:45:29 +00:00
}
var_dump( count($hashes) );
?>