# 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-x64.zip' Write-Host 'VERIFICA DEL DOWNLOAD CUVEX…' -ForegroundColor Cyan Write-Host ('File scaricato: ' + $file) if (-not (Test-Path -LiteralPath $file -PathType Leaf)) { Write-Host 'KO (FAIL) — FILE NON TROVATO' -ForegroundColor Red Write-Host 'Verifica che il download sia terminato e che il file si trovi in Download con il nome originale.' -ForegroundColor White $global:LASTEXITCODE = 1 return } try { $actual = (Get-FileHash -Algorithm SHA256 -ErrorAction Stop -LiteralPath $file).Hash Write-Host '' Write-Host '========================================' Write-Host 'RISULTATO DELLA VERIFICA CUVEX' -ForegroundColor Cyan if ($actual -eq '0f3fdcc5c4d5aafe77108d0dad1d6c6b557dec7cbb87591dcaf0c451bcf17b8e') { Write-Host 'OK — FILE VERIFICATO' -ForegroundColor Green Write-Host 'Il file corrisponde allo SHA-256 pubblicato per questa versione. La verifica di integrità è riuscita.' -ForegroundColor White $global:LASTEXITCODE = 0 return } } catch {} Write-Host 'KO (FAIL) — NON APRIRE QUESTO FILE' -ForegroundColor Red Write-Host 'Il file non corrisponde all''hash pubblicato. Scaricalo di nuovo da Cuvex e ripeti. Se fallisce ancora, contatta sato@cuvex.io.' -ForegroundColor White $global:LASTEXITCODE = 1 } exit $global:LASTEXITCODE