Take a look at the following url : http://programming.ccp14.ac.uk/ftp-mirror/programming/cygwin/pub/cygwin/latest/crypt/
The crypt.c library implemented in that source is the same one that is implemeted under php. We have successfully implented this algorithm with one of our programs (take a look at its licensing though), and have been able to check against passwords successfully.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.