# 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