MD5 function in SQLite

Rory picture Rory · Feb 22, 2011 · Viewed 27.7k times · Source

I am trying to port some sql from MySQL to SQLite, however we use mysql's md5() function, which doesn't exist in sqlite.

I've seen references to people recompiling sqlite to include this function, and i think it's possible to include user defined functions in sqlite (right?). So how do I go about adding md5() to sqlite? I'd rather not have to recompile the sqlite installed by my package manager, is it possible to have md5 without doing this?

Answer

Tim Tessier picture Tim Tessier · Jun 16, 2011

I have created an extension for sqlite using openssl functions. You may check it out here!

Be forewarned, you need a compiler and some knowledge of how to use one. I can provide some assistance if you need - just post a comment.