mirror of
https://github.com/Smaug123/ClassicalCiphers.jl
synced 2025-10-08 10:58:39 +00:00
Add Portas cipher encryption/decryption
This commit is contained in:
12
test/portas.jl
Normal file
12
test/portas.jl
Normal file
@@ -0,0 +1,12 @@
|
||||
using ClassicalCiphers
|
||||
using Base.Test
|
||||
|
||||
@test encrypt_portas("DEFENDTHEEASTWALLOFTHECASTLE", "FORTIFICATION") == uppercase("synnjscvrnrlahutukucvryrlany")
|
||||
@test decrypt_portas("synnjscvrnrlahutukucvryrlany", "FORTIFICATION") == lowercase("DEFENDTHEEASTWALLOFTHECASTLE")
|
||||
|
||||
@test decrypt_portas("synnjs cvr nrla hutu ku cvr yrlany!", "FORTIFICATION") == lowercase("DEFEND THE EAST WALL OF THE CASTLE!")
|
||||
|
||||
# doc tests
|
||||
|
||||
@test decrypt_portas("URYYB, JBEYQ!", "ab") == "hello, world!"
|
||||
@test encrypt_portas("Hello, World!", "ab") == "URYYB, JBEYQ!"
|
Reference in New Issue
Block a user