Zend - The PHP Company




Passwords

Add Code


Crazy Pass Gen and Hash  

Type: code fragment
Added by: dreadboy
Entered: 16/11/2006
Last modified: 02/11/2005
Rating: - (fewer than 3 votes)
Views: 6255
This is crazy pass generator && hash algorithm


<?php
$not_avaoble_symbols 
= array(" ","^","/","\",";",":","(",")","|","`","'",""","~","<",">",".",",","[","]","{","}","_","-","+","=","?");
$pass= "";
while (strlen(
$pass)!=12) {
       
$char = chr(rand(32,120));
       if (!in_array(
$char,$not_avaoble_symbols)) {
    
$pass .= $char;
       }
}
$pass = str_shuffle(str_rot13($pass));
$tohashmd5 = md5($pass);
$tohashcrypt = crypt($pass,CRYPT_BLOWFISH);
$tohashcrc = crc32($pass);
$hash = str_rot13(strrev(sha1(md5(sha1($tohashcrypt.$tohashcrc.$tohashmd5)).md5(sha1($tohashmd5.$tohashcrypt.$tohashcrc))."$pass")));
?>


Usage Example




Rate This Script





Search



This Category All Categories