From acb879d4727352ffb66f1a95cc88c0656337a849 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 26 Nov 2017 11:40:59 +0100 Subject: [PATCH] upd: autoloader (added secure_hash function using sha512) --- autoloader.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/autoloader.php b/autoloader.php index b17cf87..ca24bd1 100755 --- a/autoloader.php +++ b/autoloader.php @@ -19,6 +19,19 @@ + /* Secure Hash Function + * + * @raw Data to hash + * @salt Salt to use for hashing + * @pepper 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 Nom de la classe appelee