arosspope / cipher-crypt

A cryptographic tomb of ciphers forgotten by time.
Apache License 2.0
42 stars 8 forks source link

Adfgvx cipher implementation #29

Closed avastmick closed 6 years ago

avastmick commented 6 years ago

Implementation of ADFGVX Cipher. Basic function is chain the existing Polybius and ColumnarTransposition ciphers.

Tests included:

Most tests are delegated to those in Polybius and ColumnarTransposition ciphers.

Updated .travis.yml to include rustfmt 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 working adfgvx branch.

Known issues:

avastmick commented 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

avastmick commented 6 years ago

Changes to README are in. Nice attention to detail! 👍

arosspope commented 6 years ago

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.

avastmick commented 6 years ago

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.

arosspope commented 6 years ago

Awesome, I'll merge this PR in the next hour or so. Thanks 👍