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

$hashFromFile = Get-FileHash -Path $file -Algorithm SHA256
$hashFromFile | Format-List

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