Make crack_cipher outputs consistent for different ciphers

This commit is contained in:
Smaug123
2016-01-16 21:45:40 +00:00
parent aebd353646
commit d3b54be6ed
5 changed files with 11 additions and 9 deletions

View File

@@ -12,6 +12,8 @@ using Base.Test
@test (arr = ['P' 'L' 'A' 'Y' 'F'; 'I' 'R' 'E' 'X' 'M'; 'B' 'C' 'D' 'G' 'H'; 'K' 'N' 'O' 'Q' 'S'; 'T' 'U' 'V' 'W' 'Z'];
encrypt_playfair("Hello, World!", arr) == "DMYRANVQCRGE")
@test encrypt_playfair("HELXLOWORLD", "PLAYFIREXM") == "DMYRANVQCRGE"
@test encrypt_playfair("IJXYZA", "PLAYFIREXM", combined=('I', 'J')) == "RMRMFWYE"
@test encrypt_playfair("IJXYZA", "PLAYFIREXM", combined=('X', 'Z')) == "BSGXEY"