I prefer using crypt function in php for password encryption and other one way encryption requirements. Because I can use any supported encryption algorithm, by changing the salt and there are few other advantages. Normally, I don't use any salt and it takes a random MD5 salt. I save this encryption string as password hash on the database, and while authenticating the user, I use this as salt to the crypt function. It works fine in php. But when it's needed any other programing language to create a hash, while I am using crypt function in the php part of the function, we were into problem.
I would like to know whether is there any simple way to create a MD5 hash (using PHP md5() function or other), which need to be similar to what crypt function generates while using a MD5 salt. If I can understand how it works in php, without using crypt function, then there may be a good possibility to implement in other programing languages.