Speakable Password Generator

Here’s a script, which I just posted to the Revolution forum. I post it on my blog, because I like the script and it might be useful to many people. It should also be simple to translate this to PHP for instance.

This script generates passwords with length theLength, choosing consonents and vowels semi-randomly such as to keep the password speakable. This function allows for double consonants while still keeping the password speakable.

 

function speakablePassword theLength
     put “bcdfghjklmnprstwyz” into myConsonants
     put “aeiou” into myVowels
     put “” into myPass
     repeat myPasswordLength
          if char -1 of myPass is in myConsonants then
               if char -2 of myPass is in myConsonants or
                  length(myPass = 9) then
                    put any char of myVowels after myPass
               else
                    if any item of “true,false” then
                         put any char of myVowels after myPass
                    else
                         put any char of myConsonants after myPass
                    end if
               end if
          else
               put any char of myConsonants after myPass
          end if
     end repeat
     return myPass
end speakablePassword

2 thoughts on “Speakable Password Generator

Leave a Reply

Your email address will not be published. Required fields are marked *


*