NuGet.CryptoHashProvider.GetHashAlgorithm C# (CSharp) 메소드

GetHashAlgorithm() 개인적인 메소드

private GetHashAlgorithm ( ) : HashAlgorithm
리턴 System.Security.Cryptography.HashAlgorithm
        private HashAlgorithm GetHashAlgorithm()
        {
            if (_hashAlgorithm.Equals(SHA256HashAlgorithm, StringComparison.OrdinalIgnoreCase))
            {
                return AllowOnlyFipsAlgorithms ? (HashAlgorithm)new SHA256CryptoServiceProvider() : (HashAlgorithm)new SHA256Managed();
            }
            return AllowOnlyFipsAlgorithms ? (HashAlgorithm)new SHA512CryptoServiceProvider() : (HashAlgorithm)new SHA512Managed();
        }
    }