繁体   English   中英

如何在组装中看到数字签名?

[英]How can I see digital signature in assembly?

我读了有关“用强名签署大会”的文章;
http://resources.infosecinstitute.com/dot-net-assemblies-and-strong-name-signature/ ;
然后我学会了获取公钥和公钥令牌;
但是问题是:
如何从装配中获取数字签名?
以及如何从数字签名中提取哈希?
我更喜欢使用ildasm;
谢谢;

一种方法是从C#中执行此操作,如果您愿意的话:

// Load the certificate from your DLL file

var cert = X509Certificate.CreateFromSignedFile("path to your assembly");

// Create an instance of X509Certificate2

var cert2 = new X509Certificate2(cert);

// Use `GetCertHash()` to extract certificate's hash

var hash = cert2.GetCertHash();

有关使用的类型的文档:

X509证书: https : //msdn.microsoft.com/zh-cn/library/system.security.cryptography.x509certificates.x509certificate%28v=vs.110%29.aspx

X509Certificate2: https : //msdn.microsoft.com/zh-cn/library/system.security.cryptography.x509certificates.x509certificate2%28v=vs.110%29.aspx

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM