[cvs] commit: framework/MIME MIME.php framework/MIME/MIME Part.php
Chuck Hagenbuch
chuck at horde.org
Tue Oct 14 20:29:15 UTC 2008
Quoting Michael M Slusarz <slusarz at horde.org>:
>>> Log:
>>> A better random ID generator. Don't create boundary string until needed.
>>
>> If this is Horde 4/PHP 5 only, how about using Horde_Support_Uuid?
>
> UUIDs are not preferable for several reasons:
> 1. They are overly long - for most MIME operations (i.e. boundaries,
> Message-IDs), the IDs only need to be unique within each message or,
> in the case of Message-IDs, unique on that particular system; since
> we later append system information to the random ID, there is no
> need for those message-ID random strings to be globally unique. We
> don't need a 36-character long string.
> 2. UUIDs waste a lot of space, important when the information will
> be in transport. UUIDs are only in hex, so for each byte we are
> only using 16/127 of the possible ASCII values (well, less than 127
> because some of those are control characters, but for sake of
> argument...). The MIME IDs use 36/127 so we can pack more unique
> randomness into a smaller string. We theoretically could pack even
> more randomness by adding other printable characters ("!@#%^&",
> etc.) into the string, but for sake of ease of creation, 36 chars
> should be fine.
Works for me. If this is something we might want in other places, I'd
advocate a Horde_Support lib for it.
-chuck
More information about the cvs
mailing list