(content)
| 122 | * @returns {string} integrity |
| 123 | */ |
| 124 | const computeIntegrity = (content) => { |
| 125 | const hash = createHash("sha512"); |
| 126 | hash.update(content); |
| 127 | const integrity = `sha512-${hash.digest("base64")}`; |
| 128 | return integrity; |
| 129 | }; |
| 130 | |
| 131 | /** |
| 132 | * Returns true, if integrity matches. |
no test coverage detected