Suggested changes to PurpleCipherOps and need for code review

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Mon May 6 04:31:07 EDT 2013


2013/5/6 Ethan Blanton <elb at pidgin.im>:
> Tomasz Wasilczyk spake unto us the following wisdom:
>> I did all changes I posted here, but I would like to do one more.
>>
>> Currently, purple_cipher_context_reset is hardly usable, because it
>> resets both state (IV, digest context) and configuration (key, ops).
>> When using simple ciphers, like md5, it's not a problem, but for hmac
>> it is - we need to set key and hash type every time, when we want to
>> digest a value. I suggest doing a void, but significant change in API:
>
> [snip reset that only resets some values]
>
> I think this should probably be a separate function.  They serve
> different purposes.

I agree, but after introducing such new function, the old one will
become useless (in code, it's used only in the character of "partial"
one). But OK, I will do it as a separate method.

Tomek




More information about the Devel mailing list