|
Posted by Andy Hassall on 06/26/06 19:51
On Mon, 26 Jun 2006 13:24:01 -0500, Marcus <JumpMan222@aol.com> wrote:
>I have read several online tutorials advocating storing a sha1() hashed
>password in a column of type BLOB. As far as I can tell, sha1() always
>returns a string of 40 characters, regardless of the size of the
>original input. Is there any reason I can't store this as type CHAR? I
>am running MySQL 4.1.x. Thanks in advance.
SHA1 produces a 20-byte hash, for which you could use BLOB, which can also be
represented as a 40-byte hexadecimal string, for which you can use a character
type.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
[Back to original message]
|