Re: commit: framework/MIME MIME.php framework/MIME/MIME Part.php

Chuck Hagenbuch <[email protected]>
Newsgroups gmane.comp.horde.cvs
Message-ID <[email protected]>
Quoting Michael M Slusarz <[email protected]>:

>>> 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

--
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.