A client and I were brainstorming a way to generate usernames from numeric user ids (generated by the database). The key requirement is that usernames are unique.
The most obvious solution would be just set the username equal to the user id. But an important requirement is that the usernames are not "obviously sequential"-- so while the user ids might got 4000,4001,4002,4003, the client doesn't want users to see that progression in the user name, even if those numbers will eventually be used.
It would also be desirable for the length of the username to be compact-- that is, the length doesn't grow until the user ids have reached the point where it is necessary for the length to grow.
Any suggestions?
Edit: Most of the answers have assumed that security of the mechanism is important-- it is not. The client just doesn't want it to be obvious who is the "senior" member from the user name.
A primary goal of the usernames is that they be easy to remember, so long hashes aren't so good.
Alphanumerics are okay, but the client has a concern about assigning potentially "bad" usernames. fpq321 would be okay, ass123 would not. These will be the public "handle" of the users.