Closed avastmick closed 6 years ago
Okay great. To be honest, this was my first Rust project, so apologies for the sloppiness in places. I'll fix up.
I'll have a look at the ColumnarTransposition
code and the white space padding. In some tests I ran there was legitimate trailing whitespace. I understand why you included the padding, it makes the subsequent processing so much easier. But, unfortunately, I feel it does create downstream problems. I had a quick go a resolving, but I ran out of time (holidays here in China, and the kids are at home looking for things to do!).
Cheers
Changes to README are in. Nice attention to detail! 👍
Did you want to fix the trailing whitespace issue in another PR? We could always merge this one and create an issue for someone to fix later - up to you though.
Please - another PR for the whitespace, I've run out of time for now and probably won't get back to it until next week. I'll sort that out then. Cheers!
I'll open an Issue.
Awesome, I'll merge this PR in the next hour or so. Thanks 👍
Implementation of
ADFGVX
Cipher. Basic function is chain the existingPolybius
andColumnarTransposition
ciphers.Tests included:
encrypt_message
decrypt_message
with_utf8
invalid_key_phrase
Most tests are delegated to those in
Polybius
andColumnarTransposition
ciphers.Updated
.travis.yml
to includerustfmt
check to ensure consistent code style. Build fails if developer has not formatted code, use:cargo +nightly fmt
Ran
Clippy
-cargo +nightly clippy
to lint existing code. I've fixed up most of the issues and it largely aligns with idiomatic styles.Merged in latest
master
and merged in my workingadfgvx
branch.Known issues:
ColumnarTransposition
pads with whitespace that leads to output that can include trailing whitespace. I think the cipher would not include whitespace, but without the padding, thedecrypt
function is harder as it is iterating over ragged column lengths that if unhandled with cause out of bounds errors.