MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:Bill Karwin Date:January 29 2007 3:40am
Subject:SHA2() patch
View as plain text  

I've created a patch for MySQL 5.0.33 to provide a function SHA2().
Download it here:

It really just calls out to the OpenSSL library for the digest 
functions.  So you have to build MySQL from source with OpenSSL support 

You can use the function in SQL syntax like:

  SELECT SHA2('message', 256);

The second argument is 224, 256, 384, or 512, depending on what digest 
algorithm you want to use.  If you pass 0 as the second argument, it 
uses SHA-256.

This is my first code contribution to MySQL.  I'd be grateful if someone 
wants to review it and let me know if it needs any changes.

Bill Karwin
SHA2() patchBill Karwin29 Jan
  • Re: SHA2() patchStewart Smith5 Feb