spaghetti 8 years ago
parent
commit
4c98bc1431
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      classes/users.class.php

+ 2
- 2
classes/users.class.php View File

@@ -318,7 +318,7 @@ class Users {
318 318
    */
319 319
   public static function check_password($Password, $Hash) {
320 320
     if (!$Password || !$Hash) { return false; }
321
-    return password_verify(base64_encode(hash("sha512", $Password)), $Hash);
321
+    return password_verify(hash("sha512", $Password, true), $Hash);
322 322
   }
323 323
 
324 324
   /**
@@ -328,7 +328,7 @@ class Users {
328 328
    * @return salted hash
329 329
    */
330 330
   public static function make_sec_hash($Str) {
331
-    return password_hash(base64_encode(hash("sha512", $Str)), PASSWORD_DEFAULT);
331
+    return password_hash(hash("sha512", $Str, true), PASSWORD_DEFAULT);
332 332
   }
333 333
 
334 334
   /**

Loading…
Cancel
Save