Overview
SHA1:257cb45cb0b4dbeb534e83ce336c249e58796bcc
Date: 2017-01-27 00:26:04
User: bohwaz
Comment:Ne calculer la longueur qu'une seule fois
Timelines: family | ancestors | descendants | both | dev
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2017-02-17
02:08
[a1acf12dcf] Ajout signaux pour plugin, fix [743d7e1483fc23c85bd66aa44bd5673479a88913] (user: bohwaz, tags: dev)
2017-01-27
00:26
[257cb45cb0] Ne calculer la longueur qu'une seule fois (user: bohwaz, tags: dev)
00:24
[91685a0145] Ne pas utiliser shuffle/array_rand pour la crypto, utiliser quelque chose de sécurisé (user: bohwaz, tags: dev)
Changes

Modified src/include/lib/Garradin/Membres.php from [8ea0f4ea30] to [6c7caf4cad].

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)