1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! # Caesar Cipher
//!
//! Implements the functionality for the Caesar cipher.
//!
//! The following excerpt is from [Wikipedia](https://en.wikipedia.org/wiki/Caesar_cipher).
//! > In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's
//! code or Caesar shift, is one of the simplest and most widely known encryption techniques. It is
//! a type of substitution cipher in which each letter in the plaintext is replaced by a letter some
//! fixed number of positions down the alphabet. For example, with a left shift of 3, D would be
//! replaced by A, E would become B, and so on. The method is named after Julius Caesar, who used it
//! in his private correspondence.
//!
//! > The encryption step performed by a Caesar cipher is often incorporated as part of more complex
//! schemes, such as the Vigenère cipher, and still has modern application in the ROT13 system. As
//! with all single-alphabet substitution ciphers, the Caesar cipher is easily broken and in modern
//! practice offers essentially no communications security.
use crate::;
/// A Caesar cipher implementation.