12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
const ITEMS_PER_PAGE = 50;
protected function _getSalt($length)
{
static $str = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
$out = '';
for ($i = 0; $i < $length; $i++)
{
$random = \KD2\Security::random_int(0, strlen($str) - 1);
$out .= $str[$random];
}
return $out;
}
protected function _hashPassword($password)
|
>
|
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
const ITEMS_PER_PAGE = 50;
protected function _getSalt($length)
{
static $str = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
$out = '';
$max = strlen($str) - 1;
for ($i = 0; $i < $length; $i++)
{
$random = \KD2\Security::random_int(0, $max);
$out .= $str[$random];
}
return $out;
}
protected function _hashPassword($password)
|