Files
netch/GetSHA256.ps1
2020-03-19 22:28:47 +08:00

6 lines
213 B
PowerShell

param([string]$file)
$hash = [Security.Cryptography.HashAlgorithm]::Create( "SHA256" )
$stream = ([IO.StreamReader]$file).BaseStream
-join ($hash.ComputeHash($stream) | ForEach { "{0:X2}" -f $_ })
$stream.Close()