note 101711 modified in function.md5 by danbrown

From: Date: Thu, 06 Jan 2011 16:48:02 +0000
Subject: note 101711 modified in function.md5 by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-175493@lists.php.net to get a copy of this message
Here is a good encryption function im building for my custom CMS and decided to share with the community <?php function eliteEncrypt($string) { // Create a salt $salt = md5($string."%*4!#$;\.k~'(_@"); // Hash the string $string = md5("$salt$string$salt"); return $string; } ?> If you are like me, and prefer sha1() hashing, just change "md5" to "sha1". --was-- Here is a good encryption function im building for my custom CMS and decided to share with the community function eliteEncrypt($string) { // Create a salt $salt = md5($string."%*4!#$;\.k~'(_@"); // Hash the string $string = md5("$salt$string$salt"); return $string; } If you are like me, and prefer sha1() hashing, just change "md5" to "sha1". http://php.net/manual/en/function.md5.php

« previous php.notes (#175493) next »