mirror of
https://github.com/netchx/netch.git
synced 2026-05-11 23:45:06 +08:00
Update GetSHA256.ps1
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
param([string]$file)
|
param([string]$file)
|
||||||
$hash = [Security.Cryptography.HashAlgorithm]::Create( "SHA256" )
|
$hash = [Security.Cryptography.HashAlgorithm]::Create( "SHA256" )
|
||||||
$stream = ([IO.StreamReader]$file).BaseStream
|
$path = (Resolve-Path -Path $file).Path
|
||||||
-join ($hash.ComputeHash($stream) | ForEach { "{0:x2}" -f $_ })
|
$stream = ([IO.StreamReader]$path).BaseStream
|
||||||
$stream.Close()
|
-join ($hash.ComputeHash($stream) | ForEach-Object { "{0:x2}" -f $_ })
|
||||||
|
$stream.Close()
|
||||||
Reference in New Issue
Block a user