Vigenère cipher: Difference between revisions
m
→{{header|Wren}}: Minor tidy
Recombinant (talk | contribs) m (→{{header|Zig}}: refactor parameter to use enum instead of bool) |
m (→{{header|Wren}}: Minor tidy) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1,170:
=={{header|Elena}}==
{{trans|C#}}
ELENA
<syntaxhighlight lang="elena">import system'text;
import system'culture;
import system'math;
import system'routines;
Line 1,178 ⟶ 1,179:
class VCipher
{
var TXT := txt.toUpper();
foreach(char t; in TXT)
if (t <
int tmp := t - 65 +
if (tmp < 0) tmp +=
output.write((65
if (pwi == PW.Length) { pwi :=
^
}
Line 1,211 ⟶ 1,209:
var pw := "VIGENERECIPHER";
console.printLine(s0,
var s1 := v.encrypt(s0, pw, 1);
console.printLine("Encrypted:",s1);
Line 4,635 ⟶ 4,633:
{{trans|Kotlin}}
{{libheader|Wren-str}}
<syntaxhighlight lang="
var vigenere = Fn.new { |text, key, encrypt|
|