UnENVerse 0.42.6
Local-first desktop secrets manager — TypeScript frontend
Loading...
Searching...
No Matches
generators.ts File Reference

Pure secret-generation logic, shared by the Tools panel's generator panes and the add/edit form's generator popover (A8, 2026-09-15). More...

Classes

class  EntropyPoolEmpty
 

Variables

let source = 'os'
 
let pool = new Uint8Array(0)
 
let refilling = false
 
const POOL_BYTES = 8192
 

Detailed Description

Pure secret-generation logic, shared by the Tools panel's generator panes and the add/edit form's generator popover (A8, 2026-09-15).

These used to live only in tools.ts, each wired straight to its own pane's DOM. The form's "Generate" button had no way to reach the same logic without either reimplementing it (a second place to get a character set or a byte count wrong) or opening the Tools panel — which A8 is the fix for, because the Tools panel sits behind the modal overlay and is unreachable while the form is open. Moved here rather than copied: tools.ts now calls these too.

Deliberately DOM-free: every function takes plain options and returns a value (or, for the hash, a promise), so both a Tools pane and a popover pane can wire whatever inputs they have to the same function without either one reaching into the other's markup.

Variable Documentation

◆ source

let source = 'os'

◆ pool

let pool = new Uint8Array(0)

◆ refilling

let refilling = false

◆ POOL_BYTES

const POOL_BYTES = 8192