text_verschluesselung.php


Quell Code


<html>
<head>
<title>Verschl&uuml;sselung</title>
<script>
  var alleZeichen="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ,.-;:!'()=?ßäöüÄÖÜ+*/";
  function verschluessele2(){
    var Urtext=document.Codierung.Urtext.value;
    var Schluessel=document.Codierung.Schluessel.value;
    var Codiert="";
    var Stelle, StelleS, Summe;
    var SPosition = 0;
    while (Schluessel.length < Urtext.length) {
      Schluessel = Schluessel + Schluessel; }
    for (i=0; i < Urtext.length ; i++ ) {
      Stelle = alleZeichen.indexOf(Urtext.charAt(i));
      StelleS = alleZeichen.indexOf(Schluessel.charAt(i));
      if ((Stelle > -1)&& (StelleS > -1)){
        Summe = Stelle + StelleS;
        if (Summe >= alleZeichen.length) {
          Summe = Summe - alleZeichen.length; }
        Codiert = Codiert + alleZeichen.charAt(Summe);}
      else { Codiert = Codiert + "_"; }
    }
    document.Codierung.VText.value = Codiert;
  }// Ende der Funktion

function entschluessele2(Vt, Schl){
    var Vtext=Vt.value;
    var Schluessel=Schl.value;
    var Decodiert="";
    var Stelle, StelleS, Summe;
    var SPosition = 0;
    while (Schluessel.length < Vtext.length) {
      Schluessel = Schluessel + Schluessel; }
    for (i=0; i < Vtext.length ; i++ ) {
      Stelle = alleZeichen.indexOf(Vtext.charAt(i));
      StelleS = alleZeichen.indexOf(Schluessel.charAt(i));
      if ((Stelle > -1)&& (StelleS > -1)) {
        Summe = Stelle - StelleS;
        if (Summe < 0) {
          Summe = Summe + alleZeichen.length; }
        Decodiert = Decodiert + alleZeichen.charAt(Summe);}
      else { Decodiert = Decodiert + " "; }
    }
    document.Codierung.Urtext.value = Decodiert;
  }// Ende der Funktion

</script>
</head>
<body >
<b>Text eingeben:</b>
<form   name="Codierung">
<textarea name="Urtext" cols="70" rows="10" wrap="virtual"></textarea><br>
Schl&uuml;sselwort:
<input type="text"  size="30"  name="Schluessel">
<input type="BUTTON" value="verschl&uuml;sseln" onclick="verschluessele2()">
<input type="BUTTON" value="entschl&uuml;sseln" onclick="entschluessele2(VText,Schluessel)"><br>
<textarea name="VText" cols="70" rows="10" wrap="virtual"></textarea>

</form>
</body>
</html>

Add Comment

* Required information
1000
Drag & drop images (max 1)
Powered by Commentics

Comments (1)

Gravatar
New

To play Slope Unblocked , open your web browser and search for the game or visit a site offering unblocked games. Click to start, and use the left and right arrow keys to steer the ball down an endless, neon-lit slope. Your objective is to navigate the ball, avoiding obstacles and edges while maintaining control as the speed increases. The game tests your reflexes and precision, requiring quick reactions to survive as long as possible. With its simple controls and progressively challenging game play, Slope Unblocked provides an engaging and exciting experience. Try to beat your high score with each run!


Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0