22 lines
746 B
PHP
Executable File
22 lines
746 B
PHP
Executable File
<?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;
|
|
}
|