RosettaCodeData/Task/Vigen-re-cipher/Erlang/vigen-re-cipher-2.erl
2023-07-01 13:44:08 -04:00

7 lines
330 B
Erlang

-module(testvigenere).
-import(vigenere,[encrypt/2, decrypt/2]).
main(_) ->
Key = "Vigenere cipher",
CipherText = encrypt("Beware the Jabberwock, my son! The jaws that bite, the claws that catch!", Key),
RecoveredText = decrypt(CipherText, Key),
io:fwrite("Ciphertext: ~s~nDecrypted: ~s~n", [CipherText, RecoveredText]).