Generates a cryptographic hash of the given data using the specified algorithm. This method replicates crypto.subtle.digest() from the Web Crypto API, suitable for SHA and other algorithms.
algorithm The hash algorithm to use (e.g., "SHA1", "SHA256", "SHA384", "SHA512").
data The data to hash.
Returns: A Promise that resolves to the hashed output as an Uint8Array.
Generates a cryptographic hash of the given data using the specified algorithm. This method replicates
crypto.subtle.digest()from the Web Crypto API, suitable for SHA and other algorithms.algorithmThe hash algorithm to use (e.g., "SHA1", "SHA256", "SHA384", "SHA512").dataThe data to hash.Returns: A Promise that resolves to the hashed output as an Uint8Array.