Changed order of arguments
Added salt to hash checking