Changeset 8 for trunk/Modules/User/User.php
- Timestamp:
- Jun 1, 2023, 12:18:18 AM (19 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/User.php
r7 r8 1 1 <?php 2 3 include_once(dirname(__FILE__).'/PasswordHash.php'); 2 4 3 5 define('LOGIN_USED', 'Přihlašovací jméno již použito.'); … … 28 30 define('DEFAULT_GROUP', 1); 29 31 30 class PasswordHash31 {32 function Hash($Password, $Salt)33 {34 return sha1(sha1($Password).$Salt);35 }36 37 function Verify($Password, $Salt, $StoredHash)38 {39 return $this->Hash($Password, $Salt) == $StoredHash;40 }41 42 function GetSalt()43 {44 mt_srand(microtime(true) * 100000 + memory_get_usage(true));45 return sha1(uniqid(mt_rand(), true));46 }47 }48 49 32 // TODO: Make User class more general without dependencies to System, Mail, Log 50 33
Note:
See TracChangeset
for help on using the changeset viewer.