如何在C#中生成Authenticode哈希? [英] How to generate an Authenticode Hash in C#?
问题描述
我正在研究生成可以导入到AppLocker中的XML文件的可行性.根据该帖子,我在这里,尽管AppLocker将SHA256显示为哈希类型,但仍会生成SHA2 Authenticode哈希.
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.
我一直在研究System.Security.Cryptography命名空间中可用的哈希算法,但是找不到SHA2 Authenticode的哈希算法.在.NET中可以做到吗?
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?
谢谢
推荐答案
您可以使用System.Security.Cryptography.SHA256
Here is MSDN article about SHA256 Class and there is example how to use it MSDN
这篇关于如何在C#中生成Authenticode哈希?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!