# 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 'A VERIFICAR A SUA TRANSFERÊNCIA CUVEX…' -ForegroundColor Cyan Write-Host ('Ficheiro transferido: ' + $file) if (-not (Test-Path -LiteralPath $file -PathType Leaf)) { Write-Host 'KO (FAIL) — FICHEIRO NÃO ENCONTRADO' -ForegroundColor Red Write-Host 'Confirme que a transferência terminou e que o ficheiro está em Transferências com o nome original.' -ForegroundColor White $global:LASTEXITCODE = 1 return } try { $actual = (Get-FileHash -Algorithm SHA256 -ErrorAction Stop -LiteralPath $file).Hash Write-Host '' Write-Host '========================================' Write-Host 'RESULTADO DA VERIFICAÇÃO CUVEX' -ForegroundColor Cyan if ($actual -eq 'b78c1451735c5db6dd8cc7776db225f29cc1187b70aefeddcbe6968dce070d9c') { Write-Host 'OK — FICHEIRO VERIFICADO' -ForegroundColor Green Write-Host 'O ficheiro corresponde ao SHA-256 publicado para esta versão. A verificação de integridade foi concluída com êxito.' -ForegroundColor White $global:LASTEXITCODE = 0 return } } catch {} Write-Host 'KO (FAIL) — NÃO ABRA ESTE FICHEIRO' -ForegroundColor Red Write-Host 'O ficheiro não corresponde ao hash publicado. Transfira-o novamente a partir da Cuvex e repita. Se voltar a falhar, contacte sato@cuvex.io.' -ForegroundColor White $global:LASTEXITCODE = 1 } exit $global:LASTEXITCODE