Hi,
I want to "mix" char* data in this form:
source = (source + some_primary_number) % 256;
--the 256 line is because of I need to keep the range of char.
so I can do the "mix" and "un-mix" in 2 functions - the implementation above is for the mixing and this one is for the un-mixing:
source = source - some_primary_number;
if ( source < 0)
{
source = 256 + source
}
This works, of course. But is there any option to do the mixing and un-mixing with the same function?
I remember something fuzzy with congruent math...
Can you help me please? Thanks!