Ejemplo n.º 1
0
function tableMaker($key)
{
    $alphabetTemplate = "abcdefghiklmnopqrstuvwxyz";
    $cleanKey = stripRepeats($key);
    $cipherTable = $cleanKey;
    for ($i = 0; $i < strlen($alphabetTemplate); $i++) {
        if (strpos($cipherTable, $alphabetTemplate[$i]) === false) {
            $cipherTable .= $alphabetTemplate[$i];
        }
    }
    return trim($cipherTable);
}
Ejemplo n.º 2
0
function getCipherString($key)
{
    $alphabetTemplate = "abcdefghijklmnopqrstuvwxyz";
    $cleanKey = stripRepeats($key);
    $cipherString = $cleanKey;
    for ($i = 0; $i < strlen($alphabetTemplate); $i++) {
        if (strpos($cipherString, $alphabetTemplate[$i]) === false) {
            $cipherString .= $alphabetTemplate[$i];
        }
    }
    return trim($cipherString);
}