Pinned asset review
A developer wants to generate the integrity value for an inline script before moving it to a hosted asset.
Inputs
- Content: console.log('hello')
- Algorithm: SHA-384
Steps
- Hash the content
- Encode the digest as Base64
- Prefix the algorithm label
Result
- The final integrity attribute value is ready to paste into markup.