Skip to content

Commit 1bd80bb

Browse files
authored
Merge pull request #56 from jagdish-15/configlet-auto-sync
🤖 Configlet sync: docs, metadata, and filepaths
2 parents ad05110 + 32bb011 commit 1bd80bb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

exercises/practice/affine-cipher/.docs/instructions.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ E(x) = (ai + b) mod m
1818

1919
Where:
2020

21+
- `i` is the letter's index from `0` to the length of the alphabet - 1.
22+
- `m` is the length of the alphabet.
23+
For the Latin alphabet `m` is `26`.
24+
- `a` and `b` are integers which make up the encryption key.
25+
2126
Values `a` and `m` must be _coprime_ (or, _relatively prime_) for automatic decryption to succeed, i.e., they have number `1` as their only common factor (more information can be found in the [Wikipedia article about coprime integers][coprime-integers]).
2227
In case `a` is not coprime to `m`, your program should indicate that this is an error.
2328
Otherwise it should encrypt or decrypt with the provided key.

0 commit comments

Comments
 (0)