A tiny (<10 line) function that uses webcrypto to get a SHA256 hash of a string.
npm install boring-webcrypto-sha256A quick (< 10 lines) version of MDNs function to get the SHA256 hash of a string
Read the code, check it's correct, compare it to MDN version, make sure the built version is the same, and compare with the Linux command line to ensure you get the same output:
```
echo -n 'someInput' | sha256sum
``
npm i boring-webcrypto-sha256
Then just:
``
import { getSHA256Hash } from "./sha256";
and
```
const hash = await getSHA256Hash('someInput')
That's all.