C# - 使用强名称并不能保护程序集
我已经用强名签署了我的程序集。
我已经从 VS2005 Solution Explorer -> 完成了它装配体右键->签名。
但 RedGate 的 .net 反射器仍然能够浏览代码。
那么汇编签名有什么用呢?
I have signed my assembly with strong-name.
I have done it from VS2005 Solution Explorer -> Assembly Right-click -> Signing.
But still RedGate's .net reflector
is able to browse through the code.
Then what is the use of assembly signing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
程序集签名不是混淆。程序集的强名称保证了程序集的来源(即用您的私钥签名的程序集只能由您编写),并且它保证程序集未被篡改。
重申一下,如果您想限制 Reflector,请混淆您的程序集。
Assembly signing is not obfuscation. An assembly's strong name guarantees the origin of the assembly (i.e. an assembly signed with your private key can only have been written by you), and it guarantees that the assembly hasn't been tampered with.
To reiterate, if you want to clamp down on Reflector, obfuscate your assembly.
签名并非旨在保护您的代码免遭反汇编。如果您需要,请查看混淆器。
签名是强命名的一部分,它允许来自不同供应商的具有相同名称的程序集以及不同版本的程序集共存。
唯一的“保护”签名提供是,在无法访问原始密钥对的情况下不可能创建“假”替代品。签名将数字签名添加到您的程序集中(作为公钥标记可见)。
Signing is not intended to protect your code form dis-assembly. If you want that, look into obfuscators.
Signing is part of strong-naming, and that allows assemblies from different suppliers with the same name, and different versions of assemblies to co-exist.
The only 'protection' signing offers is that it is not possible to create a 'fake' replacement without access to the original key-pair. Signing adds a digital signature to your assembly (visable as the Public key token).