mirror of
https://github.com/netchx/netch.git
synced 2026-03-18 18:13:21 +08:00
Update sha256.ps1
This commit is contained in:
@@ -1,6 +1,2 @@
|
||||
param([string]$file)
|
||||
$hash = [Security.Cryptography.HashAlgorithm]::Create( "SHA256" )
|
||||
$path = (Resolve-Path -Path $file).Path
|
||||
$stream = ([IO.StreamReader]$path).BaseStream
|
||||
-join ($hash.ComputeHash($stream) | ForEach-Object { "{0:x2}" -f $_ })
|
||||
$stream.Close()
|
||||
(Get-FileHash $file -Algorithm SHA256).Hash.ToLower()
|
||||
|
||||
Reference in New Issue
Block a user