开发者

How to sign digitally with SHA-2 in PowerShell (NOT OpenSSL)

How can I sign digitally a string with SHA-2 by PowerShe开发者_开发技巧ll script, not using OpenSSL? I know how to do it with OpenSSL, but I'm wondering if there is a way to do it with .Net classes.

Thank you.


The PowerShell Community Extensions module provides easy access to the .NET types that do hashing via SHA-256/385/512 e.g.:

C:\PS> "This is a test" | Get-Hash -Algorithm SHA256


Algorithm: SHA256


Path       :
HashString : 309CB8ABAB6504945ACD10CE99546D2355AD5AE3B4CE99DA8ACCBC4EE7388EF9
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜