public override void SetHashAlgorithm(string strName) { // Verify the name if (CryptoConfig.MapNameToOID(strName) != null) { // Uppercase known names as required for BCrypt _algName = HashAlgorithmNames.ToUpper(strName); } else { // For .NET Framework compat, exception is deferred until VerifySignature _algName = null; } }
public override void SetHashAlgorithm(string strName) { try { // Verify the name Oid.FromFriendlyName(strName, OidGroup.HashAlgorithm); // Uppercase known names as required for BCrypt _algName = HashAlgorithmNames.ToUpper(strName); } catch (CryptographicException) { // For desktop compat, exception is deferred until VerifySignature _algName = null; } }