On 2016/11/15 10:38 PM, Jens Alfke wrote:
On Nov 15, 2016, at 11:35 AM, Quan Yong Zhai <q...@msn.com> wrote:

Create a custom function MD5 ,
If you’re going to go to this trouble, at least use SHA256!

MD5 is broken. These days no one should be using it for anything, except when 
needed for compatibility with legacy formats/protocols.

This strikes me as one of those statements that, upon hearing that a rocket failed to land upright, cries out: "OMG, this is the end of Space exploration as we know it!".

MD5 is not broken. What would broken mean? It still hashes a byte array just as good as it always did producing an easy key to check and compare against. Sure, for ultimate safety systems you /should/ note that the hashes /could/ possibly be brute-forced to, in the minimum case, reproduce a duplicate answer for a different byte-list.

So, if you provide public safety documents / programs / systems that may provide opportunity for nefarious intent individuals to abuse, please step up your hashing, but if you need unique keys for your program that keeps kids-party attendance lists, MD5 is as good a method (and as fast) as any - in the same way that it is still OK to use INTEGER PRIMARY KEY rather than a complete SHA256 primary ID column for your shopping list.

That said, I don't disagree with the notion that, IF the OP is going to go through the trouble of making custom functions to accomplish this task, might as well go full regalia.

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to