Bacon cipher: Difference between revisions
m
→{{header|Agena}}: Use "if a then b else c fi" expressions instead or "a and b or c" expressions
(Added Agena) |
m (→{{header|Agena}}: Use "if a then b else c fi" expressions instead or "a and b or c" expressions) |
||
Line 42:
# get the Bacon code of the next character #
local plainChar := upper( plainText[ pos ] );
local code := baconCodes[
for c to size code do
# copy punctuation as is from the stego template to the result
Line 49:
encoded := encoded & s;
nextStegoPos();
s :=
od;
# encode the character by changing the case of the stego character as appropriate
local templateChar := stegoTemplate[ stegoPos + 1 ];
encoded := encoded &
nextStegoPos()
od
Line 82:
then
# have a full letter to decode
decoded := decoded &
letters := 0;
codedChar := 0
Line 109:
print( baconDecoded );
print( "-----------------------------------------------------" );
print(
epocs</lang>
{{out}}
|