My formula for vigenere is not quite right, and I'm not sure which part is wrong, could someone leave me some bread crumbs please
int j = 0;
int upperk = key[j % klen] - 'A';
int lowerk = key[j % klen] - 'a';
for (int i = 0, l = strlen(plaintext); i < l; i++)
{
if (isupper(plaintext[i]))
{
printf("%c", (plaintext[i] - 'A' + upperk) % 26 + 'A');
j++;
}
else if (islower(plaintext[i]))
{
printf("%c", (plaintext[i] - 'a' + lowerk) % 26 + 'a');
j++;