That's a rather... unusual... thing to be trying to do, so, no, I doubt that there's any widely-used standard approach. What do you intend to accomplish by doing this?
A few points, though:
- Any crypto method which produces similar output for similar input is pretty poor crypto. As already mentioned, crypt() ignores anything after the first 8 characters, making it a pretty poor choice for dealing with inputs over 8 characters long.
- crypt() is a one-way hashing function, so using it (or MD5 or SHA*) would only be useful in this scenario for determining whether a filename entered by the user corresponds to an existing file or not. You cannot reverse the hashing process to get a list of plaintext filenames from the list of hashes, which makes it very easy to "lose" files.
- Hashing filenames would basically just turn the name of the file into a password needed to access its contents. Using a password-protected file format (with plaintext-named files) is the normal way to accomplish this.
- I've never heard of anyone wanting to encrypt/hash user names before. I'm kind of getting the impression here that you either work for an ultra-high-security organization (in which case you should already know these things) or you're just "encrypting" everything in sight without first stopping to consider what benefit may or may not be gained by obscuring each type of information.