Skip to content

Commit 426df63

Browse files
committed
Use nodejs one-liner to compute SRI hash
1 parent 01125f1 commit 426df63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ Adding SRI configuration to your HTML script tag ensures that the resource will
337337
You can generate the SRI hash yourself based on the base64-encoded version of the sha256 hash of the release.
338338
For example, after downloading version `v0.8.16+commit.07a7930e`, run:
339339
```bash
340-
sha256sum --binary soljson-v0.8.16+commit.07a7930e.js | awk '{ print $1 }' | xxd -revert -plain | base64
340+
node -e "console.log(crypto.createHash('sha256').update(fs.readFileSync('./soljson-v0.8.16+commit.07a7930e.js', 'utf8')).digest('base64'))"
341341
```
342342
```
343343
J7KCDvk4BaZcdreUWklDJYLTBv0XoomFcJpR5kA2d8I=

0 commit comments

Comments
 (0)