コード例 #1
0
	public void Invariants () 
	{
		algo = new HMACSHA1 ();
		AssertEquals ("HMACSHA1.CanReuseTransform", true, algo.CanReuseTransform);
		AssertEquals ("HMACSHA1.CanTransformMultipleBlocks", true, algo.CanTransformMultipleBlocks);
		AssertEquals ("HMACSHA1.HashName", "SHA1", algo.HashName);
		AssertEquals ("HMACSHA1.HashSize", 160, algo.HashSize);
		AssertEquals ("HMACSHA1.InputBlockSize", 1, algo.InputBlockSize);
		AssertEquals ("HMACSHA1.OutputBlockSize", 1, algo.OutputBlockSize);
		AssertEquals ("HMACSHA1.ToString()", "System.Security.Cryptography.HMACSHA1", algo.ToString ()); 
	}
コード例 #2
0
ファイル: HMACSHA1Test.cs プロジェクト: Profit0004/mono
	public void Invariants () 
	{
		algo = new HMACSHA1 ();
		Assert.IsTrue (algo.CanReuseTransform, "HMACSHA1.CanReuseTransform");
		Assert.IsTrue (algo.CanTransformMultipleBlocks, "HMACSHA1.CanTransformMultipleBlocks");
		Assert.AreEqual ("SHA1", algo.HashName, "HMACSHA1.HashName");
		Assert.AreEqual (160, algo.HashSize, "HMACSHA1.HashSize");
		Assert.AreEqual (1, algo.InputBlockSize, "HMACSHA1.InputBlockSize");
		Assert.AreEqual (1, algo.OutputBlockSize, "HMACSHA1.OutputBlockSize");
		Assert.AreEqual (64, algo.Key.Length, "HMACSHA1.Key.Length");
		Assert.AreEqual ("System.Security.Cryptography.HMACSHA1", algo.ToString (), "HMACSHA1.ToString()"); 
	}