Ihor Radchenko writes: >> Ihor, I am afraid of collisions due to short input to md5. Long hash >> value gives false impression of high entropy but actually there are not >> so many variants for 1 or 2 characters strings. Either there is no point >> in making long name from short id or random string of appropriate length >> should be used instead. > > Random is not an option. If we use random string, how will we get the > right attachment path on a second call? This function must return the > same value given the same input. > > Having said that, I do agree (taking into account the other comment) > that md5 may not be a very good idea. Maybe simply something like > "__/id". Ideally, we should be able to recover the original id from the > path to attachment. I have updated the patch to use "__/id" when id is too short. Any objections?