Create GetSHA256.ps1

This commit is contained in:
Amazing_DM
2020-03-19 22:28:47 +08:00
committed by GitHub
parent d616380deb
commit 8fc4e3151f

5
GetSHA256.ps1 Normal file
View File

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