如何在C#中生成Authenticode哈希? [英] How to generate an Authenticode Hash in C#?

查看:84
本文介绍了如何在C#中生成Authenticode哈希?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究生成可以导入到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

这是有关SHA256类的MSDN文章,并且有示例如何使用它

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

这篇关于如何在C#中生成Authenticode哈希?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆