You are here: Tip for generating passwords/serial numbers « PHP Programming Language « IT news, forums, messages
Tip for generating passwords/serial numbers

Posted by Peter Fox on 08/02/05 11:54

The recent thread in generating PINs reminded me:

Suppose I want to give someone a random password or ID then this is what
I do:
(1) Generate a hash, eg. MD5 form something, possibly a random number.
This gives a string in hex.
(2) Truncate it to the required number of characters

THEN
(3) Substitute the characters 0,1,5,8,B,C with eg h,k,p,r,t,w,x,y.
eg "AB15708" might become "AKTX7YH"

THE REASON is that O/0 1/l 5/S 8/B c/C can be mis-read. (Also M and N
are not suitable substitutes as if they are read over the phone are
easily confused. )

Personally for 1-off numbers I prefer to have a longer string and use
all upper case but for passwords use mixed case and shorter string to
encourage users to mix their case when they pick their own.




--
PETER FOX Not the same since the submarine business went under
peterfox@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>

 

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

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