Vigenère cipher: Difference between revisions

Content deleted Content added
m →‎{{header|Zig}}: writer.print() is void (no return value)
Chkas (talk | contribs)
Line 1,143: Line 1,143:


<syntaxhighlight lang="easylang">
<syntaxhighlight lang="easylang">
proc encr txt$ pw$ d . r$ .
func$ encr txt$ pw$ d .
r$ = ""
txt$[] = strchars txt$
txt$[] = strchars txt$
for c$ in strchars pw$
for c$ in strchars pw$
Line 1,160: Line 1,159:
.
.
.
.
return r$
.
.
s$ = "Beware the Jabberwock, my son! The jaws that bite, the claws that catch!"
s$ = "Beware the Jabberwock, my son! The jaws that bite, the claws that catch!"
pw$ = "VIGENERECIPHER"
pw$ = "VIGENERECIPHER"
call encr s$ pw$ 1 r$
r$ = encr s$ pw$ 1
print r$
call encr r$ pw$ -1 r$
print r$
print r$
print encr r$ pw$ -1
</syntaxhighlight>
</syntaxhighlight>



=={{header|Elena}}==
=={{header|Elena}}==