Ignore:
Timestamp:
Jun 1, 2023, 12:18:18 AM (19 months ago)
Author:
chronos
Message:
  • Modified: Updated Common package.
  • Modified: Form types made as separate FormManager package.
  • Fixed: PHP 8.1 support.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Modules/User/User.php

    r7 r8  
    11<?php
     2
     3include_once(dirname(__FILE__).'/PasswordHash.php');
    24
    35define('LOGIN_USED', 'Přihlašovací jméno již použito.');
     
    2830define('DEFAULT_GROUP', 1);
    2931
    30 class PasswordHash
    31 {
    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 
    4932// TODO: Make User class more general without dependencies to System, Mail, Log
    5033
Note: See TracChangeset for help on using the changeset viewer.