Hash($Password, $Salt) == $StoredHash; } function GetSalt(): string { mt_srand(intval(microtime(true)) * 100000 + memory_get_usage(true)); return sha1(uniqid(mt_rand(), true)); } }