I was bored so i was running a brute force attack on a simple encryption scheme i came up with. I'm using a known plaintext and known (complementary) ciphertext. So the computer's job it to guess the key until it finds the right one.
The encrypt() function i wrote works both as the encryptor and decryptor, it acts on two given strings (plaintext and the key) and returns a string (the enciphered one).
My question now is, how do i get the computer to start guessing? i.e. ->