(filePath)
| 21 | * @returns {Promise<string>} base64-encoded SHA-256 |
| 22 | */ |
| 23 | export async function hashFile(filePath) { |
| 24 | const buf = await readFile(filePath) |
| 25 | return crypto.createHash('sha256').update(buf).digest('base64') |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Compute the SHA-256 hash of an in-memory string or Buffer. |
no test coverage detected
searching dependent graphs…