(hashes, realPath, isOptional = false)
| 68 | } |
| 69 | |
| 70 | async function calculateHashesForFile(hashes, realPath, isOptional = false) { |
| 71 | try { |
| 72 | const data = await readFile(realPath, null); |
| 73 | return calculateHashForData(hashes, data); |
| 74 | } catch (e) { |
| 75 | if (!isOptional) { |
| 76 | throw e; |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | function hashTypes(signatureVersion) { |
| 82 | if (signatureVersion === 0) { |
no test coverage detected