[Patch] Text_Password - improved pronounceability

From: Date: Mon, 08 Dec 2003 11:42:01 +0000
Subject: [Patch] Text_Password - improved pronounceability
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24254@lists.php.net to get a copy of this message
Hi there, This patch affects the pronounceability of passwords generated by the _createPronounceable() function, without any noticeable degradation in performance or any obfuscation of the code. Conceptually, there are three changes. 1 The main functional change is that the $c array of consonants and consonant soudns in replaced with a pair of arrays. $c1 which contains consonants and consonant sounds which are suitable for beginning a string. $cn is an array of consonants and consonant sounds which are more suited to the middle and and of strings. For example "rt" is not pronounceable at the start of a word, but is when preceded by a vowel sound. 2 The construction of _createPronounceable's returned value has also been modified to take advantage of the above. Instead of looping through pairs of (Random Consonant Sound, Random Vowel Sound), the returned pronounceable password is now constructed as: Initial Consonant Sound, followed by pairs of (Random Vowel Sound, Random Consonant Sound) 3. The contents of the vowel array have also been tweaked. The pronounceability of any string is subjective. I find that the strings produced by this patch are more pronounceable than those produced by the original. People from a different linguistic heritage may disagree. This is an area which I frequently find myself coming back to as generating random pronounceable strings efficiently is important for a project I work on. I will periodically attempt to improve this area of my local copy of the code, and would be happy to release those improvements to Pear, if approved. This is my first time submitting a Pear patch, so please forgive any glaring breaches of protocol. I have tried to follow the coding and submission guidelines on pear.php.net Best Reagrds, Jack Healy -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ .

« previous php.pear.dev (#24254) next »