note 106762 added to security.database.storage

From: Date: Mon, 05 Dec 2011 08:24:18 +0000
Subject: note 106762 added to security.database.storage
Groups: php.notes 
Request: Send a blank email to php-notes+get-184898@lists.php.net to get a copy of this message
I use following code to hash data. Each hash is different for each user using the userid. Aswell the saltbefore makes it impossible for the attacker to use predefined rainbow tables.... <?php /** * @package Global * @subpackage Security */ class Password { /** * * @param string $plain * the password as plainstring * @param int $userid * the userid of the user * @return string */ public static function hash($plain,$userid) { $pw = 'saltbefore'.$plain.sha256(($userid*424242*pi())); $hash = md5($pw); return $hash; } } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 178.200.160.19 ---- Manual Page -- http://www.php.net/manual/en/security.database.storage.php Edit -- https://master.php.net/note/edit/106762 Del: integrated -- https://master.php.net/note/delete/106762/integrated Del: useless -- https://master.php.net/note/delete/106762/useless Del: bad code -- https://master.php.net/note/delete/106762/bad+code Del: spam -- https://master.php.net/note/delete/106762/spam Del: non-english -- https://master.php.net/note/delete/106762/non-english Del: in docs -- https://master.php.net/note/delete/106762/in+docs Del: other reasons-- https://master.php.net/note/delete/106762 Reject -- https://master.php.net/note/reject/106762 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184898) next »