Generate a SHA-256 digest from text using the Web Crypto API.
What SHA-256 does
SHA-256 maps input bytes to a 256-bit digest. The same input produces the same digest.
Password-storage warning
A plain SHA-256 digest is not a purpose-built password hashing scheme. Password storage typically requires a dedicated, salted, computationally expensive password-hashing approach.