Beispiel #1
0
        public PasswordHashResponse Hash(PasswordHashRequest request)
        {
            var algorithm = RetrieveAlgorithm(request.AlgorithmId);

            if (algorithm == null)
            {
                throw new PasswordHashException($"Provided algorithm ID ({request.AlgorithmId}) did not result in a hash algorithm being found in the repo.");
            }

            return(algorithm.Hash(request.Password, request.Salt));
        }
 public PasswordHashResponse Hash(PasswordHashRequest request)
 => Hash(request.Password, request.Salt);