summaryrefslogtreecommitdiff
path: root/scripts/check-sha256.ps1
blob: e551605ad066bb33793a61877be1f3ceb723393c (plain)
1
2
3
4
5
6
7
param([string]$file, [string]$hash);

$hashFromFile = Get-FileHash -Path $file -Algorithm SHA256

if ($hashFromFile.Hash -ne $hash) {
    Throw 'Hash mismatch!'
}