Programming from A to Z

Keyword-based 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.

- Wikipedia -

 This cipher is based on the Caesar cipher but slightly different from it. It shifts characters using a given keyword.
 It uses the first character of the keyword as a shifter for the first character of its input string, the second character of the keyword for the second character of the string, and so on.
 If the input string is longer than the keyword, the cipher starts from the first character of the keyword again and repeats the process until it encrypts all the characters in the input string.
 You can test this cipher by yourself. Enter a keyword and a string, then hit the Encrypt or the Decrypt button.
 Encrypt will shift the string using your keyword and Decrypt will shift the string reversely.

Enjoy!