PurpleCipher breakout

Gary Kramlich grim at reaperworld.com
Mon Feb 14 16:59:40 EST 2011


On 02/14/2011 03:17 PM, Elliott Sales de Andrade wrote:
> On Mon, Feb 14, 2011 at 3:51 PM, Gary Kramlich<grim at reaperworld.com>  wrote:
>    
>> On 02/14/2011 01:09 PM, Mark Doliner wrote:
>>      
>>> On Sun, Feb 13, 2011 at 10:59 PM, Gary Kramlich<grim at reaperworld.com>
>>>   wrote:
>>>
>>>        
>>>> I just pushed a new branch to break the hash/cipher implementations out
>>>> to separate files.  The branch is named im.pidgin.cipher_breakout.
>>>>
>>>>          
>>> What's the motivation for moving it into a separate directly and
>>> building it as a convenience library?
>>>
>>>        
>> Adding ciphers isn't a fun task to begin with, even less so when you have to
>> jump around a 3000+ line file.  The convenience library was built to get the
>> source files out of the main purple source directory.  There's enough going
>> on there that we don't need to add 8 new source files to it.
>>      
> Sure, but do we need the convenience library (and thus the extra API,
> if I understand the reasoning)? I'm pretty sure we have stuff in
> libpurple/media/ that doesn't require a convenience library to get it
> included.
>    
Holy crap, there is no new api, just the convenience functions for our 
glue to use GChecksum if it's available rather than our implementions of 
md5, sha1, and sha256.

If exposing these 4 functions is such a big deal, move it to a separate 
file that contains the code to wrap md5, sha1, and sha256 through glib 
wrapped in one GLIB_VERSION_CHECK(2,16,0).  Then there are no api 
changes what so ever.

With the other ciphers, they expose a symbol that only needs to be known 
by cipher.c which is where the prototype is for it, since without a 
fancy discovery registration system, is where they'll need to go.

And please, in stead of just asking questions about this, just go look 
at the code, it's only 8 revs, and it should be easy to sort out the 
cipher moves from the stuff you guys are concerned with.

--
Gary Kramlich




More information about the Devel mailing list