public void Invariants () 
		{
			algo = new HMACSHA256 ();
			AssertEquals ("HMACSHA256.CanReuseTransform", true, algo.CanReuseTransform);
			AssertEquals ("HMACSHA256.CanTransformMultipleBlocks", true, algo.CanTransformMultipleBlocks);
			AssertEquals ("HMACSHA256.HashName", "SHA256", algo.HashName);
			AssertEquals ("HMACSHA256.HashSize", 256, algo.HashSize);
			AssertEquals ("HMACSHA256.InputBlockSize", 1, algo.InputBlockSize);
			AssertEquals ("HMACSHA256.OutputBlockSize", 1, algo.OutputBlockSize);
			AssertEquals ("HMACSHA256.ToString()", "System.Security.Cryptography.HMACSHA256", algo.ToString ()); 
		}
예제 #2
0
		public void Invariants () 
		{
			var algo = new HMACSHA256 ();
			Assert.IsTrue (algo.CanReuseTransform, "HMACSHA256.CanReuseTransform");
			Assert.IsTrue (algo.CanTransformMultipleBlocks, "HMACSHA256.CanTransformMultipleBlocks");
			Assert.AreEqual ("SHA256", algo.HashName, "HMACSHA256.HashName");
			Assert.AreEqual (256, algo.HashSize, "HMACSHA256.HashSize");
			Assert.AreEqual (1, algo.InputBlockSize, "HMACSHA256.InputBlockSize");
			Assert.AreEqual (1, algo.OutputBlockSize, "HMACSHA256.OutputBlockSize");
			Assert.AreEqual (64, algo.Key.Length, "HMACSHA256.Key.Length");
			Assert.AreEqual ("System.Security.Cryptography.HMACSHA256", algo.ToString (), "HMACSHA256.ToString()"); 
		}