Hashing in Windows
Powershell
File
Get-FileHash -Algorithm (MD5 | SHA1 | SHA256 | SHA384| SHA512) -LiteralPath DVD.iso
Text
$text = 'test text'
$memoryStream = [System.IO.MemoryStream]::new()
$streamWriter = [System.IO.StreamWriter]::new($MemoryStream)
$streamWriter.Write($text)
$streamWriter.Flush()
$memoryStream.Position = 0
$hash = Get-FileHash -InputStream $MemoryStream -Algorithm 'SHA512'
$memoryStream.Dispose()
$streamWriter.Dispose()
$hash.Hash
Command
File
certutil.exe -hashfile c:\temp\dvd.iso ( md5 | sha1 | sha256 | sha384 | sha512 )
Related
- Working With SSH Keys
- Create a Password Hash in Linux
- Create OpenSSL CA (Certificate Authority) for Dev/Test Purposes
- WireGuard Essentials
- Changing Windows Network Profile
- How to check for Suspicious root CA certificates in Windows
- How to Start an Application as Another User from the Command Line in Windows
- How to turn the Windows Firewall On or Off Via the Command Line.
Links
- https://docs.microsoft.com/en-us/dotnet/api/microsoft.powershell.commands.getfilehashcommand?view=powershellsdk-7.0.0&viewFallbackFrom=pscore-6.0.0