Small browser-only example for hashing a selected file with the Web Crypto API.
The file is read locally by the browser. It is not uploaded anywhere.
- Select a local file
- Read it as an ArrayBuffer
- Generate a SHA-256 hash with
crypto.subtle.digest - Print the checksum as a hex string
Use the full browser version here:
Browse more: