From 7f03450427ceb527d7752d66dd3200a57e09a6b1 Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 22 Jan 2025 18:06:49 -0700 Subject: Format the assignment 3 output --- 3431709-assignment-3.pdf | Bin 187523 -> 201299 bytes assignments/3-solution.md | 26 ++++++++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/3431709-assignment-3.pdf b/3431709-assignment-3.pdf index e2e4f82..9ae5907 100644 Binary files a/3431709-assignment-3.pdf and b/3431709-assignment-3.pdf differ diff --git a/assignments/3-solution.md b/assignments/3-solution.md index 478de5a..3403327 100644 --- a/assignments/3-solution.md +++ b/assignments/3-solution.md @@ -109,17 +109,23 @@ Chapter 8: > 9. Using a Caesar cipher with s = 5, decode the received message RTAJ TZY FY IF -```plaintext -| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | - -Key: s = 5 - -| F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | - -| Ciphertext | RTAJ TZY FY IFBS | -| Plaintext | MOVE OUT AT DAWN | -``` +The following code can be used to decipher the Caesar cipher. ```ruby !include assignments/3/caesar.rb ``` + +The plaintext is `MOVE OUT AT DAWN`. + +```bash +$ ruby caesar.rb +# Caesar Cipher + +| --------------- | --------------------------------------------------- | +| Plain Alphabet | A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z | +| Cipher Alphabet | F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,A,B,C,D,E | +| --------------- | --------------------------------------------------- | +| Key | 5 | +| Ciphertext | RTAJ TZY FY IFBS | +| Plaintext | MOVE OUT AT DAWN | +``` -- cgit v1.2.3