コード例 #1
0
		public void HashWithBadTypeThrows()
		{
			HashAlgorithmProvider hashProvider = new HashAlgorithmProvider(typeof(Exception), false);
			hashProvider.CreateHash(plainText);
		}
コード例 #2
0
		public void HashFailureThrowsWithInstrumentationEnabled()
		{
			HashAlgorithmProvider hashProvider = new HashAlgorithmProvider(typeof(SHA1Managed), false);
			ReflectionInstrumentationBinder binder = new ReflectionInstrumentationBinder();
			binder.Bind(hashProvider.GetInstrumentationEventProvider(), new HashAlgorithmInstrumentationListener("foo", true, true, true));

			hashProvider.CreateHash(null);
		}