C# 使用 X.509 v.3 证书的方法。
2015-06-24 14:49
330 查看
C# 使用 X.509 v.3 证书的方法。
public static void Main()
{
// The path to the certificate.
string Certificate = "Certificate.cer";
// Load the certificate into an X509Certificate object.
X509Certificate cert = new X509Certificate(Certificate);
// Get the value.
string resultsTrue = cert.ToString(true);
// Display the value to the console.
Console.WriteLine(resultsTrue);
// Get the value.
string resultsFalse = cert.ToString(false);
// Display the value to the console.
Console.WriteLine(resultsFalse);
}
public static void Main()
{
// The path to the certificate.
string Certificate = "Certificate.cer";
// Load the certificate into an X509Certificate object.
X509Certificate cert = new X509Certificate(Certificate);
// Get the value.
string resultsTrue = cert.ToString(true);
// Display the value to the console.
Console.WriteLine(resultsTrue);
// Get the value.
string resultsFalse = cert.ToString(false);
// Display the value to the console.
Console.WriteLine(resultsFalse);
}
相关文章推荐
- C#DES对较大文件和文件字节数组对象加密解密
- C#结构体与类区别
- C# 当double数值较大且小数位过多时转化成字符串并保留小数位
- C#中字符串一些使用方法
- C#.NET彩票数据分析
- C# WinForm开发系列 - ADO.NET
- c#WebBrowser进阶
- How does it work in C#? - Part 3 (C# LINQ in detail)
- C# 制作Zip压缩包
- C#代码反编译 得到项目可运行源码
- C#实现图片缩放(包括缩略图和旋转)
- C#实现任意角度旋转图片(方法2)
- C#实现任意角度旋转图片(方法1)
- csharp: using wininet.dll
- c#语言报表和图表。
- 初探C#的打印功能
- C# 深入浅出 委托与事件
- C# PropertyGrid控件应用心得
- AE+C#开发问题实录(一)每用户订阅上的所有人 SID 不存在
- 如何使用C#加密解密XML文档