These things aren’t really easy to make by hand. You should let software handle it, e.g. if you build a script that lets people upload their own icons. Otherwise you can always use an online service such as md5.cz.
You could also use `hash('sha512', strtolower(trim($node->nodeValue)))` and you will get the same strings as are used in the ‘users’ directory. That will not help you in the creating of them, but at least you get a bit more order as you can compare to the user files.