One of "SHA-1", "SHA-256", "SHA-384", "SHA-512".
SHA-1 is broken for collision resistance: use it only to interoperate
with systems that require it, never for signatures or integrity.
The data to hash (string or bytes).
Hex-encoded digest string.
Compute a cryptographic hash digest using the Web Crypto API.