List:General Discussion« Previous MessageNext Message »
From:Jon Sturgeon Date:November 13 2003 9:52pm
Subject:Re: Problems storing SHA1 Hash
View as plain text  
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

Thread
Problems storing SHA1 HashParide De Gasperis13 Nov
  • Re: Problems storing SHA1 HashJon Sturgeon13 Nov
  • Re: Problems storing SHA1 HashDan Nelson13 Nov