Skip to content

seed

seed(): never

Defined in: src/secure.ts:36

Always throws: a secure generator must not be made reproducible.

Present so the mistake fails loudly at the call site instead of quietly producing predictable secrets.

never

import { RansuError } from "ransu";
try {
seed();
} catch (error) {
if (error instanceof RansuError) {
error.code; // "UNSEEDABLE_ENGINE"
}
}
// Import from "ransu" when you want reproducible values.