Solution:
User Algorithm Zone feature, the perfect way is you pass the algorithm into the dongle to perform the calculation, so the output will direct show into your program.
If only compare the result, it will not that secure.
Here I give an example, let say your program want to calculate how many vehicle in the parking lot.
Assume Motorcycle is A, car is B, bicycle is C.
So total of vehicle = A + B + C
You can write the algorithm D=A+B, D=D+C, and the result will no need compare by your program.
Let say hacker change your dongle, or bypass your dongle, if they don’t know the algorithm, then the result in your program will be incorrect, so even user can run your program, the result also incorrect.
In short, you have to make the algorithm to be comprehensive rather than just 1+1=2, which is too easy to guess, if too easy to guess, the advance hacker can still manage to do something on it.