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; }
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; }
function decode($encryptedText, $key) { $decodedText = ""; $cipherTable = tableMaker($encryptedText, $key); return $decodedText; }