Generate a lowercase SHA-256 hexadecimal digest with the Web Crypto API.
Usage:
import { sha256Hex } from "mazey";const digest = await sha256Hex("hello world");console.log(digest); Copy
import { sha256Hex } from "mazey";const digest = await sha256Hex("hello world");console.log(digest);
Output:
b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 Copy
b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9
Text or binary data to hash.
A promise that resolves to the lowercase hexadecimal digest.
Requires Web Crypto. String input also requires TextEncoder.
TextEncoder
When the required platform API is unavailable. Digest failures are propagated.
Generate a lowercase SHA-256 hexadecimal digest with the Web Crypto API.
Usage:
Output: