From d7ae163f8888cd9bf13e5a34e4d37f9518f76c01 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Mon, 22 Jun 2026 23:25:40 +0300 Subject: fix: make windows installer checksum independent of get-filehash refs #751 --- website/install.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'website/install.ps1') diff --git a/website/install.ps1 b/website/install.ps1 index ccf08239..37ad8f78 100644 --- a/website/install.ps1 +++ b/website/install.ps1 @@ -147,7 +147,13 @@ function Test-FileDigest { return } - $actual = (Get-FileHash -LiteralPath $Path -Algorithm SHA256).Hash.ToLowerInvariant() + $sha256 = [System.Security.Cryptography.SHA256]::Create() + try { + $bytes = [System.IO.File]::ReadAllBytes($Path) + $actual = [System.BitConverter]::ToString($sha256.ComputeHash($bytes)).Replace("-", "").ToLowerInvariant() + } finally { + $sha256.Dispose() + } if ($actual -ne $ExpectedDigest.ToLowerInvariant()) { throw "Downloaded Herdr checksum did not match. Expected $ExpectedDigest but got $actual." } -- cgit v1.2.3