note 112585 added to function.md5

From: Date: Tue, 02 Jul 2013 06:26:05 +0000
Subject: note 112585 added to function.md5
Groups: php.notes 
Request: Send a blank email to php-notes+get-195428@lists.php.net to get a copy of this message
This recursive function allow you to hash something in depth using md5(). <?php function checksum($what, $depth = 1) { $depth--; if (!$depth) return md5($what); else return md5(checksum($what, $depth)); } ?> The function hashed the previous hash to md5() again and again for number of times and returns the last received hash. Example usage: <?php for ($i = 1; $i <= 10; $i++) { echo "$i. ".checksum("test", $i)."<br />"; } ?> It can be used for security purposes. ---- Server IP: 89.190.194.18 Probable Submitter: 87.246.49.250 ---- Manual Page -- http://php.net/manual/en/function.md5.php Edit -- https://master.php.net/note/edit/112585 Del: integrated -- https://master.php.net/note/delete/112585/integrated Del: useless -- https://master.php.net/note/delete/112585/useless Del: bad code -- https://master.php.net/note/delete/112585/bad+code Del: spam -- https://master.php.net/note/delete/112585/spam Del: non-english -- https://master.php.net/note/delete/112585/non-english Del: in docs -- https://master.php.net/note/delete/112585/in+docs Del: other reasons-- https://master.php.net/note/delete/112585 Reject -- https://master.php.net/note/reject/112585 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195428) next »