what is mcrypt_create_iv(32, MCRYPT_DEV_URANDOM)? you use this for get a random string?,you just want to crack a string in database that encrypt using sha?, use python for cracking, u can't use php because php has timeout in browser. time is depends your computer perform, because you can use 1- n process to crack it using thread