testing library
TEST-ONLY. A deterministic in-memory MaktubPasskeyPlatform for unit, widget and simulator tests — never for production.
A real authenticator's PRF output is a hardware/keychain secret we cannot
reproduce off-device; the fake stands in for it with a deterministic
function of a syncedSeed so tests can exercise OUR logic (probe → derive →
store → register, the fail-closed branches, the enrollment proof, and a
simulated new-device recovery) without a phone. It deliberately CANNOT
demonstrate the platform property that PRF is stable across two synced
devices — that stays the real-device QA blocker (#306 §10 / #307 C3).
Release exclusion (non-negotiable, #307 C1). This library is imported
only by tests; app lib/ must never import it (a CI guard enforces that),
and the constructor asserts it is not running in a release build. So even if
it were wired by mistake, a release binary would trip the assert rather than
silently believe a non-recoverable key is recoverable.
Classes
- FakeMaktubPasskey
-
Deterministic, configurable fake. The
syncedSeedmodels the credential's synced PRF secret: twoFakeMaktubPasskeys built with the SAME seed reproduce the SAME PRF output for a given salt — that is how a "new synced device" is simulated in tests.