Getting error: execution time limit exceeded with module

So because there is no equivalent to bycrypt’s compare function do you just end up using scryptSync twice? For example if you were hashing a password the first would be to salt and hash the user’s password before it is stored in a collection. Then when you want to compare the two you would salt and hash the password submitted by the client and look for a match?