Decrypting

in yii user module… i have this code in UserModule.php


public static function encrypting($string="") {

		$hash = Yii::app()->getModule('user')->hash;

		if ($hash=="md5")

			return md5($string);

		if ($hash=="sha1")

			return sha1($string);

		else

			return hash($hash,$string);

	}

it is used to encrypt password… using md5

i dont know how to decrypt it… to return string into normal character.

Well, for what purpose? Hash functions are usually designed to be irreversible. You can still try to brute-force it (e.g. by using Cryptool) or see if the hashes appear in Google.