# Cuvex: local SHA-256 verification; no network or installation. & { $folder = $PSScriptRoot $file = Join-Path $folder 'Cuvex-Desktop-1.0.0-beta.9.15-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 '5280ce80cebaa4fa0fea098e5e8b8547fe4291a4000a4be2d624e23f23fb623a') { 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