本文整理汇总了C#中System.Security.Cryptography.HMACSHA256.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# HMACSHA256.ToString方法的具体用法?C# HMACSHA256.ToString怎么用?C# HMACSHA256.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Security.Cryptography.HMACSHA256
的用法示例。
在下文中一共展示了HMACSHA256.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Invariants
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: Invariants
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()");
}