public void HashHMACSHA1FailsUsingHashAlgorithmProvider() { HashAlgorithmProviderData keyData = new HashAlgorithmProviderData(); keyData.AlgorithmType = typeof(HMACSHA1).AssemblyQualifiedName; keyData.SaltEnabled = false; keyData.Name = "BadHMACSHA1"; IHashProvider hashProvider = new HashAlgorithmProvider(); hashProvider.Initialize(new TestCryptographyConfigurationView(keyData)); hashProvider.CreateHash(plainText); }
public void HashWithBadType() { HashAlgorithmProviderData data = new HashAlgorithmProviderData(); data.AlgorithmType = "bad type"; data.Name = "bad"; IHashProvider hashProvider = new HashAlgorithmProvider(); hashProvider.Initialize(new TestCryptographyConfigurationView(data)); hashProvider.CreateHash(plainText); }
public void HashHMACSHA1FailsUsingHashAlgorithmProvider() { HashAlgorithmProviderData keyData = new HashAlgorithmProviderData(); keyData.AlgorithmType = typeof(HMACSHA1).AssemblyQualifiedName; keyData.SaltEnabled = false; keyData.Name = "BadHMACSHA1"; IHashProvider hashProvider = new HashAlgorithmProvider(); hashProvider.Initialize(new TestCryptographyConfigurationView(keyData)); hashProvider.CreateHash(plainText); }
public void HashWithBadType() { HashAlgorithmProviderData data = new HashAlgorithmProviderData(); data.AlgorithmType = "bad type"; data.Name = "bad"; IHashProvider hashProvider = new HashAlgorithmProvider(); hashProvider.Initialize(new TestCryptographyConfigurationView(data)); hashProvider.CreateHash(plainText); }