I am wantng to read a key in as an argument that will duplicate itself to the exact character length as the plaintext , read from a text file.
E.g. key = deceptive
Then i need it to repeat until the end of the plaintext file length as below:
Key: deceptivedeceptivedeceptive (incremented to exact length as plaintext)
Plaintext: wearediscoveredsaveyourself (read from a file)
Ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ (output text)
At the moment i have converted my key and plaintext into 2 integer arrays, ready to do my algorithm in order to get my ciphertext.
I am assuming i will need to add some sort of a counter, but Any ideas of how to do this?