本文整理汇总了C#中System.Security.RightsManagement.CryptoProvider.CanDecrypt属性的典型用法代码示例。如果您正苦于以下问题:C# CryptoProvider.CanDecrypt属性的具体用法?C# CryptoProvider.CanDecrypt怎么用?C# CryptoProvider.CanDecrypt使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Security.RightsManagement.CryptoProvider
的用法示例。
在下文中一共展示了CryptoProvider.CanDecrypt属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowStatus
ShowStatus(" Binding UseLicense with the SecureEnvironment" +
"\n to obtain the CryptoProvider.");
CryptoProvider cryptoProvider = useLicense.Bind(_secureEnv);
ShowStatus(" Obtaining BoundGrants.");
ReadOnlyCollection<ContentGrant> grants =
cryptoProvider.BoundGrants;
rightsBlockTitle.Text = "Rights - " + Filename(useLicenseFile);
rightsBlock.Text = "GRANTS LIST\n-----------------\n";
foreach (ContentGrant grant in grants)
{
rightsBlock.Text += "USER: " + grant.User.Name + " [" +
grant.User.AuthenticationType + "]\n";
rightsBlock.Text += "RIGHT: " + grant.Right.ToString() + "\n";
rightsBlock.Text += " From: " + grant.ValidFrom + "\n";
rightsBlock.Text += " Until: " + grant.ValidUntil + "\n";
}
if (cryptoProvider.CanDecrypt == true)
ShowStatus(" Decryption granted.");
else
ShowStatus(" CANNOT DECRYPT!");