Import
import { sha512 } from "@typed/id/_sha";Signatures
export declare const sha512: (data: BufferSource) => Effect.Effect<Uint8Array<ArrayBuffer>, never, never>;Why
This published low-level helper exposes the exact domain-separated hash used by CUID formatting without hiding platform requirements. Missing Web Crypto and rejected subtle.digest promises are Effect defects because the typed error channel is never.
Ownership and lifetime
Each Effect owns one asynchronous Web Crypto request and transfers a fresh result buffer; it retains no input after completion.
Examples
import { sha512 } from "@typed/id/_sha"
import { Effect } from "effect"
const digest = Effect.runPromise(sha512(new TextEncoder().encode("seed")))