SCS 2204 - Functional Programming
Scala Tutorial – 6
-
The Caesar cipher is one of the earliest known and simplest ciphers. It is a type of substitution cipher in which each letter in the plaintext is 'shifted' a certain number of places down the alphabet. For example, with a shift of 1, A would be replaced by B, B would become C, and so on. The method is named after Julius Caesar, who apparently used it to communicate with his generals.
a. Implement Encryption and Decryption functions of Caesar cipher. b. Then implement a Cipher function which takes Encryption and Decryption functions to process the data.