=======================================
== Výpis kódu html + javascript = file BbcJS29-v01.html ===
Autor: Ing. Vojtech Brabenec, Trenčín, 2019.
=======================================
<html><head><meta charset="UTF-8"></head>
<body style="font-family:Verdana;color:darkblue;background-color:#D8C6A0;word-wrap:break-word;">
<script type = "text/javascript">
var i=0;var tx="";var k=0;var n=0;
var k1=prompt("Vkladať kľúče - postupne:\n K1=","");
var k2=prompt("K2=","a");
var k3=prompt("K3=","a");
var k4=prompt("K4=","a");
var k5=prompt("K5=","a");
var k6=prompt("K6=","a");
var p=prompt("Posun=","1");
var s=prompt("Skok=","1");
k1=k1.toLowerCase().replace(/[^a-z]/g, "");
k2=k2.toLowerCase().replace(/[^a-z]/g, "");
k3=k3.toLowerCase().replace(/[^a-z]/g, "");
k4=k4.toLowerCase().replace(/[^a-z]/g, "");
k5=k5.toLowerCase().replace(/[^a-z]/g, "");
k6=k6.toLowerCase().replace(/[^a-z]/g, "");
p=Number(p);
s=Number(s);
var sumk1=k2+k1+k3+k5+k4+k6+k1+k2+k6+k4+k5+k3+k5+k3+k4+k2+k6+k1;
var k71="";for (i=0;i<sumk1.length;i++){k71+=sumk1.charAt((s+i*p)%sumk1.length)}
var sumk2=k3+k2+k6+k5+k3+k5+k6+k2+k2+k6+k5+k3+k1;
var k72="";for (i=0;i<sumk2.length;i++){k72+=sumk2.charAt((s+i*p)%sumk2.length)} 
function Zasi(){k=0;NTK();tx=Norm(tx);tx=TDB(tx);k7=k71;tx=Si(tx);document.getElementById("T").innerHTML=tx}
function Odsi(){k=0;NTK();k7=k71;tx=Si(tx);tx=BDUTFz(tx);document.getElementById("T").innerHTML=tx}
function ZaOd2Si(){k=0;NTK();tx=Norm(tx);k7=k72;tx=Si(tx);document.getElementById("T").innerHTML=tx}
function NTK(){tx=document.getElementById("T").innerHTML}
function Norm(){var sumtx="";var ztx="";var m=0;for (iT=0;iT<tx.length;iT++){ztx=tx.charAt(iT);if (ztx.charCodeAt()>676){m=m+1;ztx="X"}sumtx=sumtx+ztx}if (m > 0){alert(m+" -x nepovolený znak UTF8(nad 676) nahradený 'X'")}return sumtx}
function TDB(){var RBg="";var ztx="";for (iT=0;iT<tx.length;iT++){ztx=tx.charAt(iT);RBg=RBg+String.fromCharCode(((ztx.charCodeAt()-ztx.charCodeAt()%26)/26)+97)+String.fromCharCode(ztx.charCodeAt()%26+97)}return RBg}
function ZaS(){var i=0;var k=0;n=p;var Dt=0;var cZV=0;var vy="";for (i=0;i<tx.length;i++){n=n+s+i;k=(((i+k+k1.charCodeAt(n%k1.length)+k2.charCodeAt(n%k2.length)+k3.charCodeAt(n%k3.length)+k4.charCodeAt(n%k4.length)+k5.charCodeAt(n%k5.length)+k6.charCodeAt(n%k6.length)+k7.charCodeAt(n%k7.length)+Dt)-(7*97)%26)+97);cZV=k-tx.charCodeAt(i);Dt+=tx.charCodeAt(i);vy+=String.fromCharCode(cZV%26+97)}return vy}
function OdS(){var i=0;var k=0;n=p;var Dt=0;var cZV=0;var vy="";for (i=0;i<tx.length;i++){n=n+s+i;k=(((i+k+k1.charCodeAt(n%k1.length)+k2.charCodeAt(n%k2.length)+k3.charCodeAt(n%k3.length)+k4.charCodeAt(n%k4.length)+k5.charCodeAt(n%k5.length)+k6.charCodeAt(n%k6.length)+k7.charCodeAt(n%k7.length)+Dt)-(7*97)%26)+97);cZV=k-tx.charCodeAt(i);Dt+=cZV%26+97;vy+=String.fromCharCode(cZV%26+97)}return vy}
function Si(){var i=0;var k=0;n=p;var cZV=0;var vy="";for (i=0;i<tx.length;i++){n=n+s+i;k=(((i+k+(k1.charCodeAt(n%k1.length))+(k2.charCodeAt(n%k2.length))+(k3.charCodeAt(n%k3.length))+(k4.charCodeAt(n%k4.length))+(k5.charCodeAt(n%k5.length))+(k6.charCodeAt(n%k6.length))+(k7.charCodeAt(n%k7.length)))-(7*97)%26)+97);cZV=k-(tx.charCodeAt(i));vy+=String.fromCharCode(((cZV)%26 )+97)}return vy}
function BDUTFz(){var UTFr="";for (iT=0;iT<tx.length;iT=iT+2){UTFr+=String.fromCharCode(((tx.charAt(iT).charCodeAt()-97)*26)+(tx.charAt(iT+1).charCodeAt()-97))}return UTFr}
</script>
Kľúčovanie textu->txt a späť: 
<input style="background-color:transparent" value="Zakľúčovať" onclick="Zasi()" type="button">
<input style="background-color:transparent" value="Odkľúčovať" onclick="Odsi()" type="button">
<small><span contenteditable="true">Autor Ing.V.Brabenec,Trenčín,2019,BbcJS29-v01.html(©Brab®)</span></small>
<input style="background-color:transparent" value="(2°)" onclick="ZaOd2Si()" type="button">
<form id="T" style="background-color:rgba(100%,100%,100%, .2);" contenteditable="true">=</form>
</body></html>
„Proti hluposti se bojovat musí, ale vyhrát se nedá!“ Jan Werich