toip.tools

function · Browser and Node

seedFrom

Derives a reproducible seed by hashing a label with SHA-256. A guessable label produces a guessable identity; use a securely generated seed for real accounts.

@toip-tools/trust-coreView source
TypeScriptImport
import { seedFrom } from "@toip-tools/trust-core";

Declaration

TypeScriptSignature
seedFrom(label: string): Uint8Array;

Parameters

labelrequired
string

Text encoded as UTF-8 before hashing.

Returns

Uint8Array<ArrayBufferLike>

The 32-byte digest, suitable for deterministic fixtures and demos.