SMMP/test/testHashChain.php

30 lines
395 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 = 'mySecretKey';
$hashes = [];
for( $i = 0 ; $i < 1000 ; $i++ ){
$hash = sessionManager::secure_sha1($hash);
if( in_array($hash, $hashes) )
var_dump('already');
$hashes[] = $hash;
}
var_dump( count($hashes) );
?>