(paths)
| 294 | } |
| 295 | |
| 296 | function hashFiles(paths) { |
| 297 | const hash = createHash("sha256"); |
| 298 | for (const path of paths) { |
| 299 | hash.update(path); |
| 300 | hash.update("\0"); |
| 301 | hash.update(readFileSync(join(ROOT, path))); |
| 302 | hash.update("\0"); |
| 303 | } |
| 304 | return hash.digest("hex").slice(0, 16); |
| 305 | } |
| 306 | |
| 307 | function hashPath(path) { |
| 308 | return createHash("sha256").update(readFileSync(path)).digest("hex"); |