I've a "mnemonic" password generation function that goes something like this:
function Mnemonic($mnemonic)
{
$result = null;
$charset = array(str_split('aeiou', 1), str_split('bcdfghjklmnpqrstvwxyz', 1));
for ($i = 1; $i <= $mnemonic; $i++)
{
$result .= $charset[$i % 2][array_rand($charset[$i % 2])];
}
return $result;
}
Basically this generates a string with $mnemonic
length where every odd character is a consonant and every even character is a vowel. While I understand this reduces the password complexity it's usually much more easier to remember. Now I want to improve it by generating strings that are easy to type.
For instance, while a *nix newbie I always prefer RHEL based distributions over Debian ones, the main reason is the ease of typing yum
versus the ease of typing apt[-get]
, just try it for yourself.
How should I implement the logic to generate strings that are easy to type on QWERTY keyboards?
apt
easier to type thanyum
specifically because you can alternate hands while typing. – Tenebrificyum
and try typingapt
;yum
should be way easier to type (specially with just one hand). As additional easy to type examples try typingserverde
orbegreen
; oryii
vszend
. – Ramahapt
is easier thanyum
for me as well. Hopefully with enough supporters we can convince that easy-to-type is ambiguous to the typing style of the individual. Some people poke at the keyboard with one finger; some use strict typing techniques as taught in class; some use their self-grown method. I do not believe you can find any algorithm that produces easy-to-type passwords for all people. – Aideaidedecamp