You are here: Re: sha1 column type « PHP Programming Language « IT news, forums, messages
Re: sha1 column type

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация