本文整理汇总了C#中ByteString.EqualsIgnoreCase方法的典型用法代码示例。如果您正苦于以下问题:C# ByteString.EqualsIgnoreCase方法的具体用法?C# ByteString.EqualsIgnoreCase怎么用?C# ByteString.EqualsIgnoreCase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ByteString
的用法示例。
在下文中一共展示了ByteString.EqualsIgnoreCase方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HexHA2
private static ByteString HexHA2(MD5 h, ByteString qop, ByteString digestUri)
{
// If the "qop" directive's value is "auth", then A2 is:
//
// A2 = { "AUTHENTICATE:", digest-uri-value }
//
// If the "qop" value is "auth-int" or "auth-conf" then A2 is:
//
// A2 = { "AUTHENTICATE:", digest-uri-value,
// ":00000000000000000000000000000000" }
var a2 = new ByteStringBuilder(0x80);
a2.Append("AUTHENTICATE:");
a2.Append(digestUri);
if (qop.EqualsIgnoreCase("auth-int") || qop.EqualsIgnoreCase("auth-conf"))
a2.Append(":00000000000000000000000000000000");
return HexH(h, a2.ToByteString());
}
示例2: TestEqualsIgnoreCase
public void TestEqualsIgnoreCase()
{
var a = new ByteString("abc");
var b = new ByteString("ABC");
var c = new ByteString("Abc");
var d = new ByteString("AbcD");
Assert.IsTrue(a.EqualsIgnoreCase(b));
Assert.IsTrue(a.EqualsIgnoreCase(c));
Assert.IsFalse(a.EqualsIgnoreCase(d));
}