1. Convert the input text to binary data:
• Use the TextEncoder to convert the input text into binary data.
2. Use the Web Crypto API to perform SHA-256 hashing:
• Utilize the crypto.subtle.digest function from the Web Crypto API to execute the SHA-256 hashing on the binary data obtained from the previous step.
3. Convert the hash result to a hexadecimal string:
• Convert the resulting hash value, typically represented as a byte array, into a hexadecimal string using hexadecimal conversion operations.