Checking passwords against SHA512 stored values in a PGSQL database