Skip to content

Commit

Permalink
Use nodejs one-liner to compute SRI hash
Browse files Browse the repository at this point in the history
  • Loading branch information
r0qs committed Dec 5, 2022
1 parent 01125f1 commit 426df63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ Adding SRI configuration to your HTML script tag ensures that the resource will
You can generate the SRI hash yourself based on the base64-encoded version of the sha256 hash of the release.
For example, after downloading version `v0.8.16+commit.07a7930e`, run:
```bash
sha256sum --binary soljson-v0.8.16+commit.07a7930e.js | awk '{ print $1 }' | xxd -revert -plain | base64
node -e "console.log(crypto.createHash('sha256').update(fs.readFileSync('./soljson-v0.8.16+commit.07a7930e.js', 'utf8')).digest('base64'))"
```
```
J7KCDvk4BaZcdreUWklDJYLTBv0XoomFcJpR5kA2d8I=
Expand Down

0 comments on commit 426df63

Please sign in to comment.