React hook for computing cryptographic hashes.
Algorithm to use when none is passed to hash(). Defaults to "sha256".
hash()
"sha256"
function Hasher() { const { hash, digest } = useHash("sha512"); return <button onClick={() => hash("hello")}>{digest ?? "Hash it"}</button>;} Copy
function Hasher() { const { hash, digest } = useHash("sha512"); return <button onClick={() => hash("hello")}>{digest ?? "Hash it"}</button>;}
React hook for computing cryptographic hashes.