コード例 #1
0
        public static IPasswordHashAlgorithm Get(PasswordHashAlgorithmType algorithm)
        {
            switch (algorithm)
            {
            case PasswordHashAlgorithmType.SHA1:
                return(new SHA1PasswordHashAlgorithm());

            case PasswordHashAlgorithmType.HMACSHA1:
                return(new HMICSHA1PasswordHashAlgorithm());
            }
            return(null);
        }
コード例 #2
0
 public static IPasswordHashAlgorithm Get(PasswordHashAlgorithmType algorithm) => algorithm switch
 {