Anonymous user
The ISAAC cipher: Difference between revisions
→{{header|Modula-2}}: Variable names
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: change to standard markup) |
(→{{header|Modula-2}}: Variable names) |
||
Line 2,556:
Msg: TString = 'a Top Secret secret';
Key: TString = 'this is my secret key';
Mode: TMode = iEncrypt;
(* ISAAC globals *)
Line 2,765:
Mode := iEncrypt;
(* (a) XOR (Vernam) *)
Vernam(Msg,
(* (b) MOD (Vigenere) *)
Vigenere(Msg, Mode,
(* (3) Decryption *)
Mode := iDecrypt;
SeedIsaac(Key, TRUE);
(* (a) XOR (Vernam) *)
Vernam(
(* (b) MOD (Vigenere) *)
Vigenere(
(* program output *)
WriteString('Message: '); WriteString(Msg); WriteLn;
WriteString('Key : '); WriteString(Key); WriteLn;
ASCII2Hex(
WriteString('XOR : '); WriteString(
ASCII2Hex(
WriteString('MOD : '); WriteString(
WriteString('XOR dcr: '); WriteString(
WriteString('MOD dcr: '); WriteString(
END RosettaIsaac.
</lang>
|