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

Posted by Alvaro G Vicario on 08/02/05 15:59

*** Peter Fox wrote/escribió (Tue, 2 Aug 2005 09:54:31 +0100):
> 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"

It's a very complicate algorithm to just produce a password that will only
use 16 different characters, isn't it?


http://es.php.net/mt_rand (check the user notes for examples)
http://es.php.net/uniqueid


--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--

 

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

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