Exemplo n.º 1
0
 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;
     }
 }
Exemplo n.º 2
0
        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;
            }
        }