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

Michael M Slusarz <[email protected]>
Newsgroups gmane.comp.horde.cvs
Message-ID <[email protected]>
Quoting Chuck Hagenbuch <[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.

michael

-- 
___________________________________
Michael Slusarz [[email protected]]


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