Thread: Pin System
View Single Post
Old 07-24-2009, 03:36 AM   #4 (permalink)
Village Idiot
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by tony View Post
just make sure that the pin generated is unique. I haven't done anything like this, but I am guessing the encrypting functions (like md5, sha1, base, ...) could come in handy along with the random function.
I don't see how an encryption function would be of any use, MD5 and SHA1 both turn something into a given length base-16 number (meaning numbers and a-f). This has less possibilities than all letters and numbers.

Uniqueness is only a requirement if it is the only source of verification. Not allowing keys to be duplicated lessens the possible amount combination the user could have. Although this makes no real difference in practice.
__________________

Village Idiot is offline  
Reply With Quote