Do I need to publish the public key from .snk file?

后端 未结 3 1894
太阳男子
太阳男子 2020-12-06 19:48

From the description of sn.exe utility and this question I see that a copy of the public key is added to every assembly signed with the strong name. This is enough to valida

3条回答
  •  执笔经年
    2020-12-06 20:42

    No, you don't need to publish your public key outside of the assembly since it is hashed and stored as a token alongside the reference inside the client's application:

    AssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bcd6707151635d07"
    

    This gives a method to ensure that all future versions of the assembly are compiled against the same key pair and therefore from the same publisher.

    More details about how having this information stops another source from pretending to be you can be found in my other answer.

提交回复
热议问题