Skip to content

Instantly share code, notes, and snippets.

@lowleveldesign
Created July 26, 2021 07:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lowleveldesign/f1afd42662ee8dabe07cf8cbfe25e6a1 to your computer and use it in GitHub Desktop.
Save lowleveldesign/f1afd42662ee8dabe07cf8cbfe25e6a1 to your computer and use it in GitHub Desktop.
A script to compute cryptographic hashes for the provided path (used for VERIFICATION.txt)
param ([Parameter(Mandatory = $True, ValueFromPipeline = $True, Position = 0)][string]$FilePath)
$algs = "MD5","SHA1","SHA256"
$hashes = $algs | % { Get-FileHash -Algorithm $_ $FilePath }
for ($i = 0; $i -lt $hashes.Length; $i++) {
$hash = $hashes[$i]
"$($hash.Algorithm) = $($hash.Hash)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment