I am implementing an encryption algorithm and was wondering if there was a more efficient way than O(n) for xoring two unsigned char arrays? I essentially want to know if it's possible to avoid doing something like this:
unsigned char a1[64];
unsigned char a2[64];
unsigned char result[64];
for (int i=0;i<64;i++)
{
result[i] = a1[i] ^ a2[i];
}
Like I said, I know there's nothing inherently wrong with doing this but I was wondering if there was possibly a more efficient method. I need to keep my algorithm as streamlined as possible.
Thanks in advance for any information!