Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions exercises/caeser_cypher/problem.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
# Caesar Cipher

The Caesar cipher, also known as a shift cipher, is one of the simplest forms of encryption. It is a substitution cipher where each letter in the original message (called the plaintext) is replaced with a letter corresponding to a certain number of letters up or down in the alphabet.
The Caesar Cipher is a type of 'shift cyper' where each letter of the original
message is replaced with a letter a certain distance up or down the alphabet
(called the 'shift length' or key).

For example, a Caeser Cipher is applied to the message `"Cat"` with a shift
length of `3` would return `"Fdx"`. Each letter in the cipher text (encrypted
message) is 3 letters down the alphabet from the original letter.

Learn more about the Caeser Cipher here:
https://learncryptography.com/classical-encryption/caesar-cipher

In this exercise, a message and key (between -25 and 25) will be passed in as
the second and third arguments, respectively. Your program must return the
cipher text.

----------------------------------------------------------------------
## HINTS

Create a new file with a `.js` extension and start writing JavaScript! Make sure you're function is exported from the node module. Execute your program by running it with the `node` command. e.g.:
Create a new file with a `.js` extension and start writing JavaScript! Make sure
you're function is exported from the node module. Execute your program by
running it with the `node` command. e.g.:

```sh
$ node program.js
```
```sh $ node program.js ```

When you are done, you must run:

```sh
$ {appname} verify program.js
```
```sh $ {appname} verify program.js ```

to proceed. Your program will be tested, a report will be generated, and the lesson will be marked 'completed' if you are successful.
to proceed. Your program will be tested, a report will be generated, and the
lesson will be marked 'completed' if you are successful.

----------------------------------------------------------------------