# Cuvex: local SHA-256 verification; no network or installation. & { $folder = $PSScriptRoot $file = Join-Path $folder 'Cuvex-Desktop-1.0.0-Windows-x64.zip' Write-Host 'CHECKING YOUR CUVEX DOWNLOAD…' -ForegroundColor Cyan Write-Host ('Downloaded file: ' + $file) if (-not (Test-Path -LiteralPath $file -PathType Leaf)) { Write-Host 'KO (FAIL) — FILE NOT FOUND' -ForegroundColor Red Write-Host 'Check that the download is complete and the file is in Downloads with its original name.' -ForegroundColor White $global:LASTEXITCODE = 1 return } try { $actual = (Get-FileHash -Algorithm SHA256 -ErrorAction Stop -LiteralPath $file).Hash Write-Host '' Write-Host '========================================' Write-Host 'CUVEX VERIFICATION RESULT' -ForegroundColor Cyan if ($actual -eq 'a5427e10ddafc3a4c805d78310f5b8a4ee9b83e3027b893a8f50b4e8d5899cbc') { Write-Host 'OK — FILE VERIFIED' -ForegroundColor Green Write-Host 'The file matches the SHA-256 we published for this version. The integrity check completed successfully.' -ForegroundColor White $global:LASTEXITCODE = 0 return } } catch {} Write-Host 'KO (FAIL) — DO NOT OPEN THIS FILE' -ForegroundColor Red Write-Host 'The file does not match the published hash. Download it again from Cuvex and repeat the check. If it fails again, contact sato@cuvex.io.' -ForegroundColor White $global:LASTEXITCODE = 1 } exit $global:LASTEXITCODE