0
Your task:
Create a program that encrypts a string with another string using a key, using the vigenere cipher.
What a vigenere cipher does
Ciphertext: string
Key: keya
| |
v v
string
keyake
|
v
(18)(19)(17)(08)(13)(06)
(10)(04)(24)(00)(10)(04)
|
v
(28)(23)(41)(08)(23)(10)
|
v
cxpixk
If it still isn't clear, read here.
Rules: No built-ins, shortest code in bytes wins, input and output will/should always be either completely lowercase, or completely uppercase.
string, keya -> cxpixk
aaaaaaaaaaaaaaaaaaaaaaaa,abcdefghijklmnopqrstuvwxyz -> abcdefghijklmnopqrstuvwxyz
vigenere, cipher -> xqvlrvtm
short, longkey -> dvbxd
Similar, possible duplicate – xnor – 2017-06-07T03:21:48.620
1This challenge could really benefit from a description of the cipher. – Dennis – 2017-06-07T05:45:11.793
If the key is longer than the text, should we lengthen the text? You do it in your second testcase, but not in the fourth testcase – ovs – 2017-06-07T05:58:21.533
Your plaintext of a's is two letters shorter than its ciphertext. – Dennis – 2017-06-07T06:52:01.783