Esempio n. 1
0
function decode($encryptedText, $key)
{
    $decodedText = "";
    $alphabetTemplate = "abcdefghiklmnopqrstuvwxyz";
    $cipherTable = tableMaker($key);
    for ($i = 0; $i < strlen($encryptedText) - 1; $i += 2) {
        $pair = textPairing($encryptedText, $i);
        $match = decodeMatch($pair, $cipherTable);
        $decodedText .= $match;
    }
    return $decodedText;
}
Esempio n. 2
0
function decode($encryptedText, $key)
{
    $decodedText = "";
    $cipherTable = tableMaker($encryptedText, $key);
    for ($i = 0; $i < strlen($encryptedText) / $key; $i++) {
        for ($j = 0; $j < count($cipherTable); $j++) {
            $char = $cipherTable[$j][$i];
            $decodedText .= $char;
        }
    }
    return $decodedText;
}
Esempio n. 3
0
function decode($encryptedText, $key)
{
    $decodedText = "";
    $cipherTable = tableMaker($encryptedText, $key);
    return $decodedText;
}