add slow equals to prevent timing attck

according to:https://crackstation.net/hashing-security.htm#slowequals.
We should replace "==" by slow equasl to prevent timing attack