public static async Task <AuthRequest> GetValidation(AuthRequest auth) { try { KeyValuePair <long, string> idHash = await Task.FromResult(result : AuthRequest.GetHashCode(auth).Result); if (idHash.Key > 0) { auth.IsValid = (Security.PasswordHash.Create(idHash.Key, auth.Password) == idHash.Value); } } catch (Exception) { throw; } return(auth); }