Skip to content

Commit

Permalink
* Updating keywords in cargo.toml.
Browse files Browse the repository at this point in the history
* Fixing warnings on generation of documentation.
* Putting README cipher list in alphabetical order.
  • Loading branch information
arosspope committed May 21, 2018
1 parent 42cb739 commit aab6174
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "MIT/Apache-2.0"
homepage = "https://github.com/arosspope/cipher-crypt.git"
repository = "https://github.com/arosspope/cipher-crypt.git"
description = "A cryptographic tomb of ciphers forgotten by time."
keywords = ["cipher", "crypto", "caesar", "rot13", "vigenere"]
keywords = ["cipher", "classical", "crypto", "caesar", "adfgvx"]
categories = ["algorithms", "cryptography"]
readme = "README.md"
documentation = "https://docs.rs/cipher-crypt/"
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ adding the following to your Cargo.toml:

```toml
[dependencies]
cipher-crypt = "^0.13"
cipher-crypt = "^0.14"
```

Using the crate as such:
Expand All @@ -24,24 +24,24 @@ Using the crate as such:

The crypt only contains a few ciphers, but with time (and your help) it will have even more! A list of what is planned for the future and what is currently implemented is as follows.

- [x] ROT13
- [x] Caesar
- [x] ADFGVX
- [x] Affine
- [x] Rail-fence
- [x] Autokey
- [x] Baconian
- [x] Caesar
- [x] Columnar Transposition
- [x] Fractionated Morse
- [x] Hill
- [x] Playfair
- [x] Polybius Square
- [x] Rail-fence
- [x] ROT13
- [x] Scytale
- [x] Autokey
- [x] Vigenère
- [x] Hill
- [x] Fractionated Morse
- [x] Columnar Transposition
- [x] ADFGVX
- [x] Baconian
- [X] Playfair
- [ ] Porta
- [ ] Homophonic
- [ ] Four-Square
- [ ] Bifid
- [ ] Four-Square
- [ ] Homophonic
- [ ] Porta
- [ ] Straddle Checkerboard
- [ ] Trifid

Expand Down
5 changes: 2 additions & 3 deletions src/baconian.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Bacon's cipher or the Baconian cipher is a method of _steganography_
//! - a method of hiding a secret message in plain sight rather generating ciphertext.
//! It was devised by Sir Francis Bacon in 1605.
//! Bacon's cipher, or the Baconian cipher, hides a secret message in plain sight rather than
//! generating ciphertext (steganography). It was devised by Sir Francis Bacon in 1605.
//!
//! Each character of the plaintext message is encoded as a 5-bit binary character.
//! These characters are then "hidden" in a decoy message through the use of font variation.
Expand Down
7 changes: 2 additions & 5 deletions src/playfair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl Cipher for Playfair {
/// Initialize a Playfair cipher.
///
/// # Warning
/// The 5x5 key table requires any 'J' characters in the key
/// * The 5x5 key table requires any 'J' characters in the key
/// to be substituted with 'I' characters (I = J).
fn new(key: Self::Key) -> Result<Playfair, &'static str> {
let key_table = PlayfairTable::new(&key)?;
Expand All @@ -58,7 +58,6 @@ impl Cipher for Playfair {
/// ```
///
/// # Warning
///
/// * The 5x5 key table requires any 'J' characters in the message
/// to be substituted with 'I' characters (i.e. I = J).
/// * The resulting ciphertext will be fully uppercase with no whitespace.
Expand Down Expand Up @@ -97,7 +96,6 @@ impl Cipher for Playfair {
/// ```
///
/// # Warning
///
/// * The 5x5 key table requires any 'J' characters in the message
/// to be substituted with 'I' characters (i.e. I = J).
/// * The resulting plaintext will be fully uppercase with no whitespace.
Expand Down Expand Up @@ -134,8 +132,7 @@ type Bigram = (char, char);
/// [Reference](https://en.wikipedia.org/wiki/Playfair_cipher#Description)
///
/// # Errors
///
/// Returns an error if the message contains non-alpha characters.
/// * Returns an error if the message contains non-alpha characters.
fn bigram<S: AsRef<str>>(message: S) -> Result<Vec<Bigram>, &'static str> {
if message.as_ref().contains(char::is_whitespace) {
return Err("Message contains whitespace");
Expand Down

0 comments on commit aab6174

Please sign in to comment.