Closed glarsen closed 6 years ago
Thanks for the feedback @arosspope . I have made most of the changes you have requested. Once I clean up my commits I'll send the next set of changes.
Let me know when you are ready for another review
@arosspope I can't seem to recreate the rustfmt
failures that TravisCI is identifying. When I run rustfmt --version
I get 0.3.8-nightly (346238f 2018-02-04)
. I would assume that the TravisCI version is the same but I haven't identified the issue yet - any ideas?
Otherwise the code is ready for review.
Hey @glarsen, sorry for the late review. I restarted a build on travis for your branch, and everything seems to have passed... probably some weird versioning issue caused the other build to fail.
@arosspope The next iteration is ready for a review.
However, I may need to apply rustfmt
to more than just the files that I changed before it will pass the TravisCI build. Do you want me to apply these formatting changes now in this PR?
Yes, that would be good thanks. Once you've done that I'll merge 😊
@arosspope done!
Alrighty, Playfair here we go!
The cipher inputs (
key
,message
) support the alpha[a-zA-Z]
range of characters with no numbers, special characters, etc. Spaces are acceptable as they get removed internally. Theencrypt
/decrypt
methods returns the message in uppercase without whitespace.Note that given the manual nature of the cipher, the
decrypt
method can return strings that contain additional 'X' characters -- a side effect of the rule that removes repeated characters. I believe it is impossible to remove these characters programmatically if we are to keep the implementation stateless. Finally, note that any repeated characters in the key are removed (silently) per the spec for Playfair key generation.I used the Playfair wikipedia page for reference.
Let me know what you think and thank you for starting this project!