Member-only story
Rust Challenge: Rotational Cipher
Learning Rust Through Small Challenges
In this mini Rust challenges, we will solve a problem using Rust. The goal of these challenges is to get comfortable reading and writing Rust code by solving various problems.
I do them on a daily basis, so if you want to join please come back here every day and check every challenge and lets us solve them together.
Challenge
These challenges are based on exercises from Exercism. You can find the original challenges and more on their platform below.
Instructions
Create an implementation of the rotational cipher, also sometimes called the Caesar cipher.
The Caesar cipher is a simple shift cipher that relies on transposing all the letters in the alphabet using an integer key between 0
and 26
. Using a key of 0
or 26
will always yield the same output due to modular arithmetic. The letter is shifted for as many values as the value of the key.