OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Problems storing SHA1 Hash

From: Sturgeon, Jon (JonSfuturesoft.com)
Date: Thu Nov 13 2003 - 15:52:14 CST


Paride De Gasperis wrote:

> I have a problem storing an SHA1 hash generated as user password for
> an application...

I do the same thing (although not with a MySQL database) and I anticipated
problems in storing the binary hash, so I chose to perform a simple Base64
encoding of the hash result first. So I end up storing 28-character strings
in the database, like this:

v5szlQNp+vVs1xUZqdYPTe9sgzU=

I find this technique works very well and the code to perform the Base64
encode/decode is straightforward and easily found on the web.

Jon

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql