Description
The affine cipher is a monoalphabetic substitutoin cipher,
where each letter is enciphered with the function (ax+b) mod 26
(26 is the number of letters in the alphabet)
Usage
affine(word, a, b, decrypt = FALSE)
Arguments
- word
Word or phrase to be encrypted
- a
First parameter. This value and 26 must be coprime
- b
Second parameter. Magnitude of the shift
- decrypt
If `FALSE` (default), the program ciphers the input word, If `TRUE`, the program decrypts it.
References
https://en.wikipedia.org/wiki/Affine_cipher