Exemplo n.º 1
0
    $sel1 = "SELECTED";
    $orgtxt1 = substituiere($codtxt, $alfa2, $alfa);
    $orgtxt2 = substituiere($codtxt, $alfa3, $alfa);
    $orgtxt = "";
    for ($t = 0; $t < strlen($codtxt); $t++) {
        if ($t % 2 == 0) {
            $orgtxt .= substr($orgtxt1, $t, 1);
        } else {
            $orgtxt .= substr($orgtxt2, $t, 1);
        }
    }
}
if (isset($_POST['encode']) || !isset($_POST['decode']) && !isset($_POST['encode']) && $firsttime == TRUE) {
    $sel2 = "SELECTED";
    $codtxt1 = substituiere($orgtxt, $alfa, $alfa2);
    $codtxt2 = substituiere($orgtxt, $alfa, $alfa3);
    $codtxt = "";
    for ($t = 0; $t < strlen($orgtxt); $t++) {
        if ($t % 2 == 0) {
            $codtxt .= substr($codtxt1, $t, 1);
        } else {
            $codtxt .= substr($codtxt2, $t, 1);
        }
    }
}
ob_start();
?>
<form name=formular method=post>
<input type=hidden name=action value=yes>
<input type=hidden name=topic value=<?php 
echo $topic;
Exemplo n.º 2
0
function enporta($orgtxt, $key, $alfa)
{
    $laengetxt = strlen($orgtxt);
    $laengekey = trim(strlen($key));
    for ($t = 0; $t < $laengetxt; $t = $t + 1) {
        $keytxt .= substr($key, $t % $laengekey, 1);
    }
    for ($t = 0; $t < $laengetxt; $t = $t + 1) {
        $wertkey = indexVonBuchstabe($alfa, substr($keytxt, $t, 1));
        $codtxt = $codtxt . substituiere(substr($orgtxt, $t, 1), portaalfa($wertkey, $alfa), rotieren(portaalfa($wertkey, $alfa), count($alfa) / 2));
    }
    return $codtxt;
}
Exemplo n.º 3
0
        $mulv = $mulzahl[($mkey - 1) % sizeof($mulzahl)];
        unset($mult);
    }
    if ($rott) {
        $rotv = findrot($codtxt);
    }
    if ($mult) {
        $mulv = findmul($codtxt);
        $alfa2 = createMulAlfa($alfa, $mulv);
        $rotv = 0;
    }
    $alfa2 = createMulAlfa($alfa, $mulv);
    $codtxt = substituiere($codtxt, $alfa2, $alfa);
    $codtxt = dekodieren($codtxt, buchstabeVonIndex($alfa, $rotv), $alfa);
    $codtxt = kodieren($codtxt, buchstabeVonIndex($alfa, $rotv), $alfa);
    $codtxt = substituiere($codtxt, $alfa, $alfa2);
}
$lang_multiplier = JTEXT::_('MULTIPLIER');
$lang_frequency = JTEXT::_('FREQUENCYANALYSIS');
$inhalt .= '
<form name=formular method=post>
<table border=0>
    <tr>
        <td colspan=2>
            <table>
            <tr>
            <td>
            <textarea name=codtxt class="ctoformcss-txtinput-style ctoformcss-default-input-size" onClick="this.formular.codtxt.select();this.formular.codtxt.focus()">' . spacing(strtoupper($codtxt), $spacing) . '</textarea>
            </td>
            <td valign=middle><script type="text/javascript" src=js/ie_copy_codtxt.js></script></td>
            </tr>