(filePath: string)
| 1225 | // ── OTA: Utilities ── |
| 1226 | |
| 1227 | export async function computeFileHash(filePath: string): Promise<string> { |
| 1228 | return new Promise((resolve, reject) => { |
| 1229 | const hash = crypto.createHash("sha256"); |
| 1230 | const stream = fs.createReadStream(filePath); |
| 1231 | stream.on("data", data => hash.update(data)); |
| 1232 | stream.on("end", () => resolve(hash.digest("hex"))); |
| 1233 | stream.on("error", reject); |
| 1234 | }); |
| 1235 | } |
| 1236 | |
| 1237 | export function getLocalNetworkIP(): string { |
| 1238 | try { |
no test coverage detected