2016-02-12 22:34:52 +00:00
|
|
|
<?php
|
2016-02-13 17:41:19 +00:00
|
|
|
|
2016-07-02 15:10:41 +00:00
|
|
|
/* [0] On definit la racine __ROOT__ si c'est pas deja fait
|
|
|
|
=========================================================*/
|
2016-10-18 14:03:03 +00:00
|
|
|
if( !defined('__ROOT__') ) define('__ROOT__', dirname(__FILE__) );
|
|
|
|
if( !defined('__CONFIG__') ) define('__CONFIG__', __ROOT__.'/config' );
|
|
|
|
if( !defined('__BUILD__') ) define('__BUILD__', __ROOT__.'/build' );
|
|
|
|
if( !defined('__PUBLIC__') ) define('__PUBLIC__', __ROOT__.'/public_html' );
|
2016-02-13 17:41:19 +00:00
|
|
|
|
|
|
|
|
2016-02-12 22:22:14 +00:00
|
|
|
/* ACTIVE LE DEBUGGAGE (WARNING + EXCEPTION)
|
|
|
|
*
|
|
|
|
*/
|
2016-02-04 22:45:03 +00:00
|
|
|
function debug(){
|
|
|
|
ini_set('display_errors',1);
|
|
|
|
ini_set('display_startup_errors',1);
|
|
|
|
error_reporting(-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-02-19 11:14:03 +00:00
|
|
|
/*************************/
|
|
|
|
/* SECURE SHA1 ALGORITHM */
|
|
|
|
/*************************/
|
|
|
|
function secure_hash($data, $salt='">\[..|{@#))', $depth=1){
|
2017-11-09 09:19:51 +00:00
|
|
|
/* (1) On hash @depth fois
|
|
|
|
---------------------------------------------------------*/
|
|
|
|
$hash = $data;
|
|
|
|
$c = 0;
|
|
|
|
|
|
|
|
for( $h = 0 ; $h < $depth ; $h++ ){
|
|
|
|
$hash = hash('sha512', $salt.hash('sha512', $hash.'_)Q@#((%*_$%(@#') );
|
|
|
|
$c++;
|
2017-02-19 11:14:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-09 09:19:51 +00:00
|
|
|
/* (2) On renvoie le résultat
|
|
|
|
---------------------------------------------------------*/
|
|
|
|
return $hash;
|
2016-02-01 22:09:35 +00:00
|
|
|
}
|
2016-07-02 15:10:41 +00:00
|
|
|
|
2016-02-01 22:09:35 +00:00
|
|
|
|
2017-11-09 09:19:51 +00:00
|
|
|
\session_start();
|
2016-07-02 15:10:41 +00:00
|
|
|
|
|
|
|
?>
|