XOREncryption
                                
                                
                                
                                    XOREncryption copied to clipboard
                            
                            
                            
                        Problems with C version.
On the C version I made some modifications for my own needs, however now it seems to not work properly on windows. (the encrypted string does not decrypt to be the same as the original and I test printing them all out as well, I started with making the key be passed to the function itself, and thinking if it is because output has to be larger than the input string or something.
void encryptDecrypt(char *input, char *output, char *key) {
	size_t i;
	for (i = 0; i < strlen(input); i++)
		output[i] = input[i] ^ key[i % sizeof(key)];
}
On this I am taking a key of size 134 characters, and a input string of 114 characters and I expect and output (encrypted string of about the same size of larger, however I am not sure the actual size and in some places it returns multiple characters with the int value of -52. It does that value however on the decryption though after 52 characters into the string decryption. I am officially left wondering why this is.
https://cdn.discordapp.com/attachments/184740186436009984/367877048011718656/ConsoleApplication1.c
This code above demonstrates the valid problems I got with all of this.
Also why are you dividing by 1 because sizeof(char) is always 1 no matter what the platform is.