# Cuvex: local SHA-256 verification; no network or installation. & { $folder = $PSScriptRoot $file = Join-Path $folder 'Cuvex-Desktop-1.0.0-beta.9.15.1-Windows-arm64.zip' Write-Host '正在驗證您的 CUVEX 下載檔案…' -ForegroundColor Cyan Write-Host ('已下載的檔案: ' + $file) if (-not (Test-Path -LiteralPath $file -PathType Leaf)) { Write-Host 'KO (FAIL) — 找不到檔案' -ForegroundColor Red Write-Host '請確認下載已完成,且檔案以原始名稱保留在下載資料夾。' -ForegroundColor White $global:LASTEXITCODE = 1 return } try { $actual = (Get-FileHash -Algorithm SHA256 -ErrorAction Stop -LiteralPath $file).Hash Write-Host '' Write-Host '========================================' Write-Host 'CUVEX 驗證結果' -ForegroundColor Cyan if ($actual -eq 'b78c1451735c5db6dd8cc7776db225f29cc1187b70aefeddcbe6968dce070d9c') { Write-Host 'OK — 檔案驗證成功' -ForegroundColor Green Write-Host '檔案與我們為此版本公布的 SHA-256 相符。完整性驗證已成功完成。' -ForegroundColor White $global:LASTEXITCODE = 0 return } } catch {} Write-Host 'KO (FAIL) — 請勿開啟此檔案' -ForegroundColor Red Write-Host '檔案與公布的雜湊值不符。請從 Cuvex 重新下載並再次驗證。如果仍然失敗,請聯絡 sato@cuvex.io。' -ForegroundColor White $global:LASTEXITCODE = 1 } exit $global:LASTEXITCODE