App/lib/50_content.php
2020-11-25 17:28:45 +01:00

25 lines
751 B
PHP

<?php #lib/50_content.php
/********************************************************************************
* Content: Content-Management *
* Author: Nils Otterpohl *
* Last modification: 15.07.2019 *
********************************************************************************/
function cntCipherTextSym($text, $cipher)
{
$outText = "";
// Iterate through each character
for ($i=0;$i<strlen($text);) // Dont need to increment here
{
for ($j=0; $j<strlen($cipher) && $i<strlen($text); $j++, $i++)
{
$outText .= $text{$i} ^ $cipher{$j};
}
}
return $outText;
}
?>