Hi,
How can I sign digitally a string with SHA-2 by PowerShell 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.
Hi,
How can I sign digitally a string with SHA-2 by PowerShell 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