|
- #include <string.h>
-
- void xor_repeatedly(const unsigned char* const i_xor, const unsigned i_xor_len, const unsigned char* const i_string, const unsigned i_string_len, unsigned char* o_xored)
- {
- unsigned counter = 0;
- while( counter < i_string_len )
- {
- unsigned xor_idx = counter % i_xor_len;
- o_xored[counter] = (i_string[counter]) ^ (i_xor[xor_idx]);
- counter++;
- }
- }
|