Hah, I actually just converted it to use GChecksum internally a few days ago…

I didn’t make it generic though, it’s still MD5-only because that was its only 
use-case (for calculating/verifying the Content-Md5 header value).

I could make it generic, though, if you are using it for other things?

Jeff

On 3/22/17, 2:17 PM, "Albrecht Dreß" <[email protected]> wrote:

    Hi Jeff:
    
    Just an other idea which might make it on your wish list:
    
    GMime comes with a GMimeFilterMd5 stream filter for calculating a MD5 hash. 
 However, MD5 and also SHA1 [1, 2] are mostly useless these days as collisions 
can be crafted easily.
    
    What do you think of replacing GMimeFilterMd5 by something like 
GMimeFilterChecksum, which takes the hash type as constructor argument (i.e. 
"GMimeFilter *g_mime_filter_checksum_new(GChecksumType type);")?  If you use 
the g_checksum_* functions internally, this would be a minimal change I guess, 
but very helpful.  It might be better to return the digest in a newly allocated 
string, btw, like "gchar 
*g_mime_filter_checksum_get_checksum(GMimeFilterChecksum *checksum);".
    
    Opinions?
    
    Cheers,
    Albrecht.
    
    
    [1] <https://www.schneier.com/blog/archives/2017/02/sha-1_collision.html>
    [2] <https://alf.nu/SHA1>

_______________________________________________
balsa-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/balsa-list

Reply via email to