How to generate an Authenticode Hash in C#?

依然范特西╮ 提交于 2020-01-07 04:22:29

问题


I am looking into the feasibility of generating XML files that can be imported into AppLocker. According to the post I have seen here, AppLocker generates a SHA2 Authenticode hash despite it showing SHA256 as being the hash type.

I have been looking at the hash algorithms available in the System.Security.Cryptography namespace, but I cannot find one for a SHA2 Authenticode. Is this possible to do in .NET?

Thanks


回答1:


You can use System.Security.Cryptography.SHA256

Here is MSDN article about SHA256 Class and there is example how to use it MSDN



来源:https://stackoverflow.com/questions/43901146/how-to-generate-an-authenticode-hash-in-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!