[Tutorial] Properly Securing Passwords
#4

little suggestion: this function
pawn Код:
strDest[strLen] = random(2) ? (random(26) + (random(2) ? 'a' : 'A')) : (random(10) + '0');
doesnt distribute the letters equally to numbers. they both got a 50% chance to get picked, but the alphabet contains 16 more letters than numbers, and it got uppercases aswell - they're less represented compared to the numbers. (10 vs 26*2). for 52 letters, there will be only 10 numbers, caused by the ranodm(2) for taking the first choice...
explained differently: the percentage for a number is 4.2* higher than for 1 letter.
Reply


Messages In This Thread
Properly Securing Passwords - by SchurmanCQC - 22.02.2013, 00:59
Re: Properly Securing Passwords - by Luis- - 22.02.2013, 08:47
Re: Properly Securing Passwords - by SchurmanCQC - 22.02.2013, 10:55
Re: Properly Securing Passwords - by Babul - 22.02.2013, 11:12
Re: Properly Securing Passwords - by Johnson_boy - 22.02.2013, 12:00
Re: Properly Securing Passwords - by Jstylezzz - 22.02.2013, 12:02
Re: Properly Securing Passwords - by SchurmanCQC - 22.02.2013, 13:25
Re: Properly Securing Passwords - by Vince - 22.02.2013, 14:02
Re: Properly Securing Passwords - by SchurmanCQC - 22.02.2013, 14:06
Re: Properly Securing Passwords - by Vince - 22.02.2013, 14:40
Re: Properly Securing Passwords - by SchurmanCQC - 22.02.2013, 16:29
Re: Properly Securing Passwords - by Vince - 22.02.2013, 16:56
Re: Properly Securing Passwords - by Johnson_boy - 22.02.2013, 17:39
Re: Properly Securing Passwords - by Johnson_boy - 25.02.2013, 18:28
Re: Properly Securing Passwords - by Johnson_boy - 26.02.2013, 06:59
Re: Properly Securing Passwords - by playbox12 - 26.02.2013, 08:07
Re: Properly Securing Passwords - by SchurmanCQC - 08.07.2013, 15:27
Re: Properly Securing Passwords - by iTheScripter - 08.07.2013, 21:21
Re: Properly Securing Passwords - by Mindcode - 09.07.2013, 12:54
Re: Properly Securing Passwords - by BabyBauer - 17.07.2018, 14:54
Re: Properly Securing Passwords - by IdonTmiss - 17.07.2018, 17:43
Re: Properly Securing Passwords - by Calisthenics - 17.07.2018, 17:54
Re: Properly Securing Passwords - by AmigaBlizzard - 22.07.2018, 10:03

Forum Jump:


Users browsing this thread: 4 Guest(s)