How to prevent Timing attack
Fixed execution time of important functions
In the example with the function of comparing two lines, you can guarantee the same execution time in case the lines are equal and not equal. For this, we need to continue the comparison, despite the fact that different symbols have met. Some programming languages have special implementations of comparison functions that are stable to Timing attack.