|
Comments for: jesus19990502
| Message # 1010000: |
|
Date: 03/01/02 01:53
By: Mike Marinescu Profile Subject: RE: Another possible access I was looking for a random pwd generator so I did a quick change to Tomas' suggestion so that the password generated still is somewhat pronounceable but is not set in a constant pattern. The only thing I did was make sure that no more than two vowels or two constants/digits appear in a row, and setup up some random % that I decided based on the look of generated passwords. change #s to your liking... - I did not want too many upper case letters because they are hard to remember. My pattern is not anywhere as complex like FIPS181 (and doesnt eliminate annoying pairs of "ii", etc), but its a good step up from the alternating algo and more secure, while still generating decent passwds some sample generated pwds with 8 char length. hvonha8x ajquppaj exdiswu1 pEqnubro hozoR2oh what do you think? ---------- Code -------------- $base_vow = "aeiou"; $base_cons = "bcdghjklmnpqrstvwxzy"; $base_digit = "0123456789"; print generate(8); function generate($name_length) { global $base_vow,$base_cons,$base_digit; $retval = ''; mt_srand((double)microtime()*1000000); $consCount = 0; for ($p=0;$p<$name_length;$p++) { if ($consCount < 2 && $vowCount < 2){ $item = mt_rand(0,100); if ($item <= 65) { $retval .= substr($base_cons,mt_rand(0,strlen($base_cons)-1),1); $consCount++; $vowCount = 0; } else if ($item <= 70) { $retval .= strtoupper(substr($base_cons,mt_rand(0,strlen($base_cons)-1),1)); $consCount++; $vowCount = 0; } else if ($item <= 87){ $retval .= substr($base_vow,mt_rand(0,strlen($base_vow)-1),1); $consCount = 0; $vowCount++; } else if ($item <= 90){ $retval .= strtoupper(substr($base_vow,mt_rand(0,strlen($base_vow)-1),1)); $consCount = 0; $vowCount++; } else if ($item <= 100){ $retval .= substr($base_digit,mt_rand(0,strlen($base_digit)-1),1); $consCount++; $vowCount = 0; } } else if ($vowCount >= 2){ $retval .= substr($base_cons,mt_rand(0,strlen($base_cons)-1),1); $consCount++; $vowCount = 0; } else{ $retval .= substr($base_vow, mt_rand(0,strlen($base_vow)-1),1); $consCount = 0; } } return $retval; } |
Previous Message | Next Message |
| Comments: | ||
| re: pronouncable is important | Saint | 05/15/03 17:56 |
| RE: easy to remember gibberish | James | 11/28/02 20:13 |
| RE: See FIPS-181 | tom | 11/07/02 13:58 |
| Big Mistake | gilhad | 10/30/02 09:26 |
| RE: Think like an Application Architect | Lee | 08/21/02 17:04 |
| easy to remember gibberish | Andrew Penry | 07/27/02 19:39 |
| RE: Think like an Application Architect | Jon Nadal | 07/24/02 15:33 |
| Think like an Application Architect | Lee | 04/16/02 22:01 |
| RE: Another possible access | Mike Marinescu | 03/01/02 01:53 |
| RE: See FIPS-181 | mike | 01/09/02 10:52 |
| Question | Jeff Williams | 12/20/01 22:05 |
| Parse Error | Vijay Avarachen | 11/26/01 06:45 |
| RE: One (of many) alternative solution | Brian Clancey | 08/23/01 16:49 |
| RE: Another possible access | David Altherr | 07/06/01 12:29 |
| RE: One (of many) alternative solution | Hugh Bothwell | 06/23/01 11:22 |
| RE: html editor and courses | James Diss | 06/07/01 07:39 |
| How about alternate vowels & consonants? | Tom Westmacott | 05/07/01 12:29 |
| One (of many) alternative solution | Jack Healy | 05/03/01 09:29 |
| RE: Another possible access | Jeremy Weiskotten | 04/19/01 18:59 |
| html editor and courses | Marlon Benjamin | 03/08/01 11:01 |
| See FIPS-181 | Andy | 03/07/01 17:24 |
| RE: Another possible access | Katie | 03/02/01 19:19 |
| RE: Insecurity. | Bill Canaday | 02/26/01 15:12 |
| RE: Insecurity. | Jay | 02/21/01 11:26 |
| RE: Insecurity. | Lance Sloan | 02/08/01 15:56 |
| RE: Insecurity. | Allen | 02/03/01 11:49 |
| RE: Another possible access | Martin Scheffler | 01/11/01 06:17 |
| RE: Insecurity. | Matt | 12/15/00 17:50 |
| Insecurity. | Michal Zajaczkowski | 11/27/00 06:34 |
| Another possible access | Tomas Krojzl | 09/16/00 09:16 |
|
If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly. | ||


