Vigenère cipher: Difference between revisions

Content added Content deleted
m (→‎{{header|Zig}}: refactor parameter to use enum instead of bool)
imported>Arakov
Line 1,170: Line 1,170:
=={{header|Elena}}==
=={{header|Elena}}==
{{trans|C#}}
{{trans|C#}}
ELENA 4.x :
ELENA 6.x :
<syntaxhighlight lang="elena">import system'text;
<syntaxhighlight lang="elena">import system'text;
import system'culture;
import system'math;
import system'math;
import system'routines;
import system'routines;
Line 1,183: Line 1,184:
int pwi := 0;
int pwi := 0;
string PW := pw.upperCase();
string PW := pw.toUpper();
txt.upperCase().forEach:(t)
txt.toUpper().forEach:(t)
{
{
if(t >= $65)
if(t >= $65)
Line 1,211: Line 1,212:
var pw := "VIGENERECIPHER";
var pw := "VIGENERECIPHER";
console.printLine(s0,newLine,pw,newLine);
console.printLine(s0,newLineConstant,pw,newLineConstant);
var s1 := v.encrypt(s0, pw, 1);
var s1 := v.encrypt(s0, pw, 1);
console.printLine("Encrypted:",s1);
console.printLine("Encrypted:",s1);