Dude, you haven't told us anything about what you're attempting to do relative to "creating a user" or where you're doing it. Are you modifying the ISPConfig code? Are you attempting to create your own plug-in/module? It's hard for us to help when you're so vague.
ISPConfig; he's qualified to address your questions.
He also gave you a code-snippet that is copy-paste-ready and demonstrates the procedure for creating a password with the crypt-md5 algorithm.
Also, you do realize that the entire ISPConfig code-base is available to the public, right?
Perhaps checkout a copy of the SVN repository contents and dig-around...
Finally, ISPConfig has a complete API for doing things like creating new users. The newest version is very well-documented. Research it.