I am developing some software to "Mutate" inline constants in source code to make them hard to read (eg. Obfuscation) and need a way to determine two values that when divided by each other gets a predetermined remainder.
I have read up on the Remainder theorem but am finding it difficult to wrap my head around exactly what I need to implement/determine.
Basically I need a way to do the following:
Original:
x = 12
Mutated:
x = 1561312 % 13
Of course the dividend and the divisor will be much larger (I'm thinking of values like 1825141394). I considered brute forcing, but I thought I might ask around math exchange if you knew a formula or algorithm that would do what I wanted :)
int.MaxValue * int.MaxValueis never good ;)). Thanks heaps again! – jduncanator Sep 07 '13 at 06:54