upd: autoloader (added secure_hash function using sha512)

This commit is contained in:
xdrm-brackets 2017-11-26 11:40:59 +01:00
parent 6cd9baf19c
commit acb879d472
1 changed files with 13 additions and 0 deletions

View File

@ -19,6 +19,19 @@
/* Secure Hash Function
*
* @raw<String> Data to hash
* @salt<String> Salt to use for hashing
* @pepper<String> Pepper to use for hashing
*
*/
function secure_hash(String $raw, String $salt='2104\'dsa:">AS"D:', String $pepper='3894.234123;\'21'){
return hash('sha512', $pepper.hash('sha512', $raw.$salt));
}
/* AUTOLOADER
*
* @className<String> Nom de la classe appelee