Preventing timing attacks

- By using ConstantTimeCompare

Reviewed by:
Testing:
Tickets:
Backport: