private const string DOWNLOAD_URL = "https://example.com/path/to/sonic.exe"; private const string EXPECTED_SHA256 = "0123456789abcdef..."; // 64‑hex chars
public partial class MainForm : Form
private static readonly HttpClient _http = new HttpClient() // Timeout can be tuned – 5 minutes is a sensible default. Timeout = TimeSpan.FromMinutes(5) ; sonic.exe download
// 2️⃣ Prepare request (HEAD to get total size, optional resume) long totalBytes = await GetContentLengthAsync(downloadUrl, ct); long existingBytes = 0; private const string DOWNLOAD_URL = "https://example