summaryrefslogtreecommitdiff
path: root/scripts/check-sha256.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/check-sha256.ps1')
-rw-r--r--scripts/check-sha256.ps18
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/check-sha256.ps1 b/scripts/check-sha256.ps1
new file mode 100644
index 0000000000..57c9797c6a
--- /dev/null
+++ b/scripts/check-sha256.ps1
@@ -0,0 +1,8 @@
+param([string]$file, [string]$hash);
+
+$hashFromFile = Get-FileHash -Path $file -Algorithm SHA256
+$hashFromFile | Format-List
+
+if ($hashFromFile.Hash -ne $hash) {
+ Throw 'Hash mismatch!'
+}