In development. It changes without notice.
Topic
Home Screen
What the home screen shows and does besides settings: the lists, a record's detail, the one-time codes, the choice of a host, the SD card's flows and the edits.
There are three views of the lists, chosen by the board's screen and keys. On the keyboard boards a panel beside the list edits a record and the settings by typing.
Files | |
| file | src/ |
| Whether a Wi-Fi network is saved, read when a 2FA surface is entered, for the fix it offers while the TOTP gate refuses a code. | |
| file | src/ |
Credential-detail overlay collaborator for HomeStateHandler. | |
| file | src/ |
The CoreInk half of CredDetailController: the identity card, its action band, and the levels the dial opens from it. | |
| file | src/ |
The constants and helpers the sources of CredDetailController share. | |
| file | src/ |
The Stick half of CredDetailController: the identity card, its action carousel, the more list, and the two-button input. | |
| file | src/ |
The three-button half of CredDetailController: the header, identity, body and action row of the detail on the Core2 v1.3 and the CoreS3 SE, and their button and touch input. | |
| file | src/ |
| Shared per-row cache of the credential origin domain the list renders. | |
| file | src/ |
| E-paper (1-bit) render of the wide-panel vault menu. | |
| file | src/ |
BLE host-picker collaborator for HomeStateHandler. | |
| file | src/ |
| On-device settings and credential-management panel (keyboard boards). | |
| file | src/ |
| The chrome the keyboard panel's drawn screens share: the standard header and the key-hint shelf. | |
| file | src/ |
The keyboard panel's credential card (part of KeyboardPanel). | |
| file | src/ |
The keyboard panel's drawn screens: the stepper, the pickers' popover and the info panels (part of KeyboardPanel). | |
| file | src/ |
The keyboard panel's text input: the settings text entry and the field editor every typed value goes through (part of KeyboardPanel). | |
| file | src/ |
| Keyboard-board vault-menu layout (kleidos:: | |
| file | src/ |
| Narrow-panel vault-menu layout (kleidos:: | |
| file | src/ |
| Seal the vault into a card backup, and put one back — on every board. | |
| file | src/ |
| Ask what an SD CSV import should do, then run it. | |
| file | src/ |
| What an on-device SD restore tells the owner it did to their vault. | |
| file | src/ |
| SD result notices (see sd_ | |
| file | src/ |
| The notice an SD card action leaves once it has run. | |
| file | src/ |
| Per-row lazy decrypt + generate cache for a vault view's TOTP list. | |
| file | src/ |
| Pure per-row TOTP window math for a vault view's TOTP list. | |
| file | src/ |
Full-screen TOTP display collaborator for HomeStateHandler. | |
| file | src/ |
| Pure type-to-filter matching for the keyboard-board vault list. | |
| file | src/ |
| Device-layout strategy for the vault menu + its semantic-event seam. | |
| file | src/ |
| The rows of the vault's Actions tab on the three-key vault layouts, and the label each row reads. | |
| file | src/ |
| Perform an on-device vault write and classify what it did. | |
| file | src/ |
| Wide-panel vault-menu layout (kleidos:: | |
Classes | |
| class | kleidos:: |
| The saved-network answer a 2FA surface names its fix from. More about kleidos:: | |
| class | kleidos:: |
| Owns the credential-detail overlay: state, both render paths, input, the hold-progress feedback, and the decrypted credential buffers. More about kleidos:: | |
| struct | kleidos:: |
| Resolved geometry of the three-button detail: the one definition its draw and its pointer read. More about kleidos:: | |
| struct | kleidos:: |
| Per-row cache of the origin domain a vault list row renders. More about kleidos:: | |
| struct | kleidos:: |
| One frame of the ink vault menu: the active tab and its selection. More about kleidos:: | |
| struct | kleidos:: |
| Scratch buffers the ink render borrows from its owning view. More about kleidos:: | |
| class | kleidos:: |
| Owns the BLE host picker: state, drawing, input, animation, debug seam. More about kleidos:: | |
| struct | kleidos:: |
| The services of the running application the panel uses itself. More about kleidos:: | |
| class | kleidos:: |
| On-device settings panel controller. Manages sub-screens with their own menus and input handling. More about kleidos:: | |
| struct | kleidos:: |
| The chrome every drawn panel screen shares: the standard header and the shelf. More about kleidos:: | |
| class | kleidos:: |
Keyboard-board three-tab vault menu: render + input (keyboard, touch, trackball) for one device class, owning the KeyboardPanel sub-state and returning the FSM transition. More about kleidos:: | |
| class | kleidos:: |
| Narrow-panel pager vault menu: render + input + animation for one screen geometry, returning the FSM transition. More about kleidos:: | |
| struct | kleidos:: |
| What a restore attempt found and did. More about kleidos:: | |
| struct | kleidos:: |
| A finished restore's notice: headline, the sentence that states what happened to the vault, and the tone carrying the severity. More about kleidos:: | |
| struct | kleidos:: |
| Per-row cache of the currently displayed TOTP codes. More about kleidos:: | |
| class | kleidos:: |
| Owns the full-screen TOTP display: state, drawing, input, debug seams. More about kleidos:: | |
| class | kleidos:: |
Semantic-event seam a VaultMenuView invokes to activate a menu item; the parent HomeStateHandler implements it. More about kleidos:: | |
| class | kleidos:: |
| Abstract per-device vault-menu layout: owns render + input for one device class and returns the FSM transition. More about kleidos:: | |
| class | kleidos:: |
| Wide-panel vault menu: render + input for one screen geometry, returning the FSM transition. More about kleidos:: | |
Functions | |
| bool | kleidos:: |
| Whether the unlocked vault holds at least one saved Wi-Fi network. | |
| ui::ClockFix | kleidos:: |
The fix to offer for gate, reading the vault now when it refuses. | |
| void | kleidos:: |
| ui:: | kleidos:: |
| ThreeButtonDetailGeo | kleidos:: |
| ui:: | kleidos:: |
| The status cluster the e-paper header draws: the battery level and the charge mark (the panel's header carries no link icon). | |
| uint16_t | kleidos:: |
| Draw one full frame of the e-paper vault menu. | |
| PanelChrome | kleidos:: |
The header and shelf of a drawn panel screen titled title. | |
| ExportOutcome | kleidos:: |
| Ask for a passphrase, then seal the vault into the card's backup file. | |
| void | kleidos:: |
| After an export, offer to take the vault off this device. | |
| RestoreResult | kleidos:: |
| Ask for the passphrase, then put the card's backup back. | |
| CsvImportResult | kleidos:: |
| Run an SD CSV import, asking about passwordless rows if there are any. | |
| constexpr bool | kleidos:: |
| Whether the vault on flash still holds what it held before the restore. | |
| constexpr bool | kleidos:: |
| Whether a finished .kexp attempt settles the passphrase prompt. | |
| constexpr bool | kleidos:: |
| Whether a finished .kexp attempt settles the passphrase prompt, told also whether the passphrase was tried and whether the envelope opened. | |
| constexpr bool | kleidos:: |
| Whether a finished restore replaced the vault with only part of the backup. | |
| Banner | kleidos:: |
| Notice for a finished .kexp restore, in the active language. | |
| const char * | kleidos:: |
| The question a backup bigger than this device asks before any write: what it holds, what fits, and where the owner can choose instead. | |
| const char * | kleidos:: |
| The detail line of a restore that left entries out: how many of each. | |
| const char * | kleidos:: |
| The line under a finished restore's headline. | |
| void | kleidos:: |
| Show an SD result. | |
| void | kleidos:: |
| Show what a CSV import put in the vault: the counts, and a full vault by name, so an import that stopped short does not read as the whole file. | |
| void | kleidos:: |
| Show what a .kexp restore did to the vault (kleidos:: | |
| uint64_t | kleidos:: |
| RFC 6238 step index (epoch / period) of a TOTP window. | |
| bool | kleidos:: |
Whether a cached row code must be re-generated for epoch. | |
| constexpr uint8_t | kleidos:: |
| Seconds left in a window, floored to a whole e-paper step. | |
| constexpr uint64_t | kleidos:: |
| A key that changes exactly when an e-paper TOTP row must repaint. | |
| constexpr uint16_t | kleidos:: |
The period most of periods share, the first one on a tie. | |
| bool | kleidos:: |
Case-insensitive substring test of filter against name. | |
| template<typename NameAt> | |
| uint16_t | kleidos:: |
| Build a filtered visible-row → entry-index map. | |
| constexpr std::span< const VaultAction > | kleidos:: |
| The Actions-tab rows of a board. | |
| constexpr i18n:: | kleidos:: |
| The label an Actions-tab row reads. | |
| SaveOutcome | kleidos:: |
Store cred into an existing slot. | |
| SaveOutcome | kleidos:: |
Store cred into the first free slot. | |
| DeleteOutcome | kleidos:: |
Remove the credential in slot. | |
| DeleteOutcome | kleidos:: |
Remove the TOTP entry in slot. | |
Variables | |
| constexpr const char * | kleidos:: |
| Log tag of the credential detail. | |
| constexpr int16_t | kleidos:: |
| constexpr int | kleidos:: |
| constexpr int16_t | kleidos:: |
| Height of the three-button layout's action button. | |
| constexpr int16_t | kleidos:: |
| Gap between that button and the footer under it. | |
| constexpr uint8_t | kleidos:: |
| Domain cache length per credential (bytes, NUL included). | |
| CredRowCache | kleidos:: |
| The one session row cache, stored out of line so its PLACEMENT can be decided independently of its owner. | |
| constexpr uint8_t | kleidos:: |
| constexpr uint8_t | kleidos:: |
| The credential card with no button focused (the trackball has not moved). | |
| std::array< ui:: | kleidos:: |
Backing store for NarrowVaultView::. | |
| constexpr size_t | kleidos:: |
| constexpr uint32_t | kleidos:: |
| How long an SD result stays up (ms). | |
| constexpr uint32_t | kleidos:: |
| How long a result carrying counts the owner has to read stays up (ms). | |
| constexpr uint16_t | kleidos:: |
| constexpr uint8_t | kleidos:: |
| Maximum characters retained in the type-to-filter query buffer. | |
| constexpr uint8_t | kleidos:: |
| NUL-inclusive capacity of the query buffer (kVaultFilterMaxLen + 1). | |
| constexpr auto | kleidos:: |
| Every Actions-tab row, in order; Lock is always last. | |
| std::array< ui:: | kleidos:: |
Backing store for WideVaultView::. | |
Enumeration Type Documentation
CredDetailOutcome #
Outcome of one CredDetailController::
| Enumerator | |
|---|---|
| Stay | Remain in the overlay (or sleep was requested in place). |
| Closed | Back to the vault list without delete; parent repaints the menu. |
| TypeBle | Type action: credential staged into ctx.vault.bleCredential; caller types it. |
| Deleted | Credential deleted; parent reloads the list + repaints the menu. |
| RunClockFix | The 2FA code was asked for while the TOTP gate refuses one: the detail closed; the parent runs CredDetailController:: |
ExportOutcome #
HostSelectResult #
Outcome of one HostSelectController::
PanelRequest #
A settings action the panel defers to the keyboard vault view.
The panel cannot enter admin mode (an FSM transition) or run the SD Data & Backup flows on its own; it raises one of these and the vault view dispatches the shared handler.
PanelScreen #
On-device sub-screen identifiers.
TotpScreenResult #
Outcome of one TotpScreenController::
| Enumerator | |
|---|---|
| Stay | Remain on the TOTP screen (or sleep was requested in place). |
| BackToMenu | B-long, or 2FA codes turned off: leave for the vault list. |
| TypeBle | A-long / dial OK hold: code staged in ctx.vault.bleCredential. |
| RunClockFix | The same hold (Enter on a keyboard board) while the TOTP gate refuses a code: the screen closed; run TotpScreenController:: |
Function Documentation
attemptIsFinal() [1/2] #
Whether a finished .kexp attempt settles the passphrase prompt.
A separate question from vaultModified, and the two answers differ on exactly one outcome. vaultModified asks what happened to the vault, which decides the relock and the wipe record. The prompt asks whether typing the secret again can produce a different answer, and only an attempt that was refused before the envelope was opened can: every other outcome — including a backup whose counts exceed this device's slots, and one whose content this firmware does not read — is what the same file produces every time it is fed to this device, so re-asking for the passphrase renders a correct secret as a wrong one and never terminates.
- Parameters
-
Name Direction Meaning status in Outcome of a .kexp restore.
- Return values
-
Value Meaning true The prompt has its answer; render the banner. false Another attempt can land somewhere else.
attemptIsFinal() [2/2] #
Whether a finished .kexp attempt settles the passphrase prompt, told also whether the passphrase was tried and whether the envelope opened.
attemptIsFinal answers from the outcome alone, and one outcome cannot say it: Rejected is a passphrase that failed the first chunk, an envelope that opened under it before this device refused the restore for reasons of its own (a buffer held elsewhere, an anchor that would not commit), and a refusal that came before the passphrase was tried at all (no backup on the card, no memory, a card that stopped inside the header, a file that is not the one the question was about). Only the first is worth typing again: asking for the passphrase over the others calls a passphrase wrong that no one ever checked, or one that was right.
- Parameters
-
Name Direction Meaning status in Outcome of a .kexp restore. opened in A chunk of the envelope authenticated under the passphrase. tried in The passphrase was tried against the envelope's header.
- Return values
-
Value Meaning true The prompt has its answer; render the banner. false Another attempt can land somewhere else.
bannerFor() #
Notice for a finished .kexp restore, in the active language.
- Parameters
-
Name Direction Meaning status in Outcome of SdVault::.importVaultEncrypted
- Returns
- The notice to show.
buildVaultFilterMap() #
Build a filtered visible-row → entry-index map.
Walks the count entries in list order, fetches each name via nameAt, and appends the original index of every entry that matches filter into out (bounded by outCap). The result preserves list order and is strictly ascending, so a scroll window over it maps back to a contiguous-min/filter yields the identity mapping (every index in order).
- Template Parameters
-
Name Meaning NameAt Callable constchar*(uint16_t) returning entry i'sname.
- Parameters
-
Name Direction Meaning count in Number of source entries. filter in Query buffer (NUL-terminated); empty ⇒ identity. nameAt in Name accessor for a source index. out out Destination map (row → entry index). outCap in Capacity of out.
- Returns
- Number of visible rows written to
out.
createCredential() #
Store cred into the first free slot.
The slot search and the write share one vault session, and slotOut is written only when the record committed — a caller that binds its edit id to a free slot the search merely offered goes on to render a record that is on no filesystem.
- Parameters
-
Name Direction Meaning key in Vault key of the unlocked vault. cred in Record to store. slotOut out Receives the slot on success; untouched otherwise.
- Returns
- kleidos::
ui:: popup:: writereport:: SaveOutcome:: VaultFull when no slot was free.
deleteCredentialAt() #
Remove the credential in slot.
- Parameters
-
Name Direction Meaning slot in Slot id to remove.
- Returns
- kleidos::
ui:: popup:: writereport:: DeleteOutcome:: Deleted only when the record went.
deleteTotpAt() #
Remove the TOTP entry in slot.
- Parameters
-
Name Direction Meaning slot in TOTP slot id to remove.
- Returns
- kleidos::
ui:: popup:: writereport:: DeleteOutcome:: Deleted only when the entry went.
drawEpaperVaultMenu() #
Draw one full frame of the e-paper vault menu.
Renders header + tab strip + the active tab's list + action bar into a bracketed frame. The e-paper driver's damage diff collapses an unchanged repaint to no panel traffic, so the caller may repaint the whole frame on every state change.
- Parameters
-
Name Direction Meaning frame in Active tab / selection / item count. prevScrollTop in The tab's scroll window top from the last frame. scratch in, out Borrowed row buffer + shared row caches. ctx in, out Application context (menu model, power, clock).
- Returns
- The new sticky scroll-window top for the active tab.
drawValueRows() #
Draw text broken into lines rows of at most maxW at font, lineH apart from top, each at x by datum (kTopLeft: its top-left corner; kMiddleCenter: its center, within its line). The rows break at the value's seams (ui::
- Parameters
-
Name Meaning canvas The canvas to draw on. text The value to draw. font The font of every row. x The x each row is drawn at. top The top of the first row. maxW The widest a row may be, in pixels. lineH The pitch between rows, in pixels. lines The most rows to draw (at most kValueRowsMax).ink The RGB565 color of the text. datum The text datum each row is drawn by.
epaperHeaderStatus() #
The status cluster the e-paper header draws: the battery level and the charge mark (the panel's header carries no link icon).
- Parameters
-
Name Direction Meaning ctx in Application context (the battery sample).
- Returns
- The status drawEpaperVaultMenu draws in the header.
importWithOwnerAnswer() #
Run an SD CSV import, asking about passwordless rows if there are any.
Blocks while the question is on screen. When the export carries no passwordless row nothing is asked and the import starts straight away.
- Parameters
-
Name Direction Meaning ctx in Unlocked application context; its vault key drives the write.
- Returns
- The import tally, including how many rows were skipped for want of a password and how many got a generated one.
- Note
- Must be called from the task that owns the display.
leftOutDetail() #
The detail line of a restore that left entries out: how many of each.
- Parameters
-
Name Direction Meaning tally in The restore's counts. out out Buffer for the line. cap in Bytes of out.
- Returns
outholding the counts when some entry was left out, or null when none was (the banner's own detail then stands).
noticeDetail() #
The line under a finished restore's headline.
On every partial answer a restore that also ran out of room says how many entries it left out: a restore that dropped entries this build does not read, or one a write failed in, can ALSO have filled the device, and its own verdict outranks the left-out one, so the counts would otherwise be told on no surface. Each partial answer has a headline of its own (incomplete, entries dropped, restored until full), so the counts can take the line under it without the answers reading alike.
- Parameters
-
Name Direction Meaning status in Outcome of a .kexp restore. tally in Its counts. report in The banner bannerFor gave status.out out Buffer for the counts line, kNoticeDetailBytes to hold the longest one. cap in Bytes of out.
- Returns
- The counts in
out, orreport'sown detail when nothing was left out.
offerVaultWipe() #
After an export, offer to take the vault off this device.
Whoever just put their vault on a card may be moving it to another device or handing this one on, and the copy that stays behind is the one they did not ask for. So it is offered once, here, where the backup is known to exist, and declined by default: the offer resolves as "keep" on cancel, on timeout, and on any dismissal.
Accepting leads to the same destructive confirm the settings wipe uses (a sustained press, never a tap) and then to the wipe itself, which restarts the device and does not return.
- Parameters
-
Name Direction Meaning ctx in, out Application context (buttons, audio).
- Note
- Only ever called after ExportOutcome::
Written: never offer to destroy a vault whose backup did not land.
overCapacityQuestion() #
The question a backup bigger than this device asks before any write: what it holds, what fits, and where the owner can choose instead.
The body of the confirm the restore raises on DoesNotFit (sd_
- Parameters
-
Name Direction Meaning tally in The refused attempt's counts. out out Buffer for the sentence. cap in Bytes of out.
- Returns
out.
panelChrome() #
The header and shelf of a drawn panel screen titled title.
- Parameters
-
Name Direction Meaning layout in Responsive context. title in The header's title.
- Returns
- The chrome's bands.
partialVerdict() #
Whether a finished restore replaced the vault with only part of the backup.
- Parameters
-
Name Direction Meaning status in Outcome of a .kexp restore.
- Return values
-
Value Meaning true One of the three partial answers. false A whole restore, or one that wrote nothing.
readClockFix() #
The fix to offer for gate, reading the vault now when it refuses.
For a surface that offers the fix only in answer to a press (the credential detail's 2FA action): the read runs once, for that press.
- Parameters
-
Name Direction Meaning gate in The TOTP gate's verdict. ctx in Application context (the saved-network read).
- Returns
- ui::
ClockFix:: None for a passing gate or codes turned off (no vault read), else ui:: clockFixFor for this board.
runEncryptedExport() #
Ask for a passphrase, then seal the vault into the card's backup file.
The passphrase is typed on the keyboard boards and, through the on-screen keyboard, on the others. It is chosen, not generated, because whoever made the backup has to type it again on whatever device the card is carried to, and it is never derived from the PIN: an envelope travels off-device, where an attacker guesses offline, so it carries its own high-iteration KDF.
A passphrase under the envelope's floor is refused by the seal itself and the prompt stays open for another try. A passphrase the seal accepted and a write that then failed ends the prompt instead: retyping cannot make a card take a file it just refused.
Blocks while the prompt is on screen. The passphrase is zeroized by the entry UI after each attempt and never logged.
- Parameters
-
Name Direction Meaning ctx in, out Unlocked application context; its session key seals the file.
- Returns
- What the attempt left on the card.
- Note
- Must be called from the task that owns the display.
runEncryptedRestore() #
Ask for the passphrase, then put the card's backup back.
The envelope carries the records that were sealed, whichever device sealed them, and they replace what this device holds. The PIN does not travel: see the file comment. On anything that reached the vault this files the non-repudiation record and drops the cached credential list; the caller relocks, and the unlock asks for THIS device's secret, never the one the backup was taken under.
A wrong passphrase leaves the vault untouched and the prompt open. An attempt that authenticated ends the prompt whatever it did to the vault, because no retyping changes an envelope this device cannot hold.
A backup that holds more than this device stores is never refused for good: the first open writes nothing and the screen says how many it holds, how many fit and that the admin portal lets the choice be made there. Going on opens the envelope again under the same passphrase — kept for that one question, wiped on every way out — and takes the backup's entries in its own order until the device is full; the notice then says how many were left out.
- Parameters
-
Name Direction Meaning ctx in, out Application context; its vault session and caches are reset.
- Returns
- Whether a backup was found, and what the attempt did.
- Note
- Must be called from the task that owns the display.
saveCredentialInSlot() #
Store cred into an existing slot.
- Parameters
-
Name Direction Meaning key in Vault key of the unlocked vault. slot in Slot id to overwrite. cred in Record to store.
- Returns
- kleidos::
ui:: popup:: writereport:: SaveOutcome:: Saved only when the record is on flash.
show() #
Show an SD result.
- Parameters
-
Name Direction Meaning title in What the action did. sev in Its tone. detail in The line under the title, or null for none.
showCsv() #
Show what a CSV import put in the vault: the counts, and a full vault by name, so an import that stopped short does not read as the whole file.
- Parameters
-
Name Direction Meaning result in The import tally.
showRestore() #
Show what a .kexp restore did to the vault (kleidos::
- Parameters
-
Name Direction Meaning status in Outcome of the restore. tally in Its counts; on every partial answer the left-out ones replace the banner's detail (kleidos:: states:: sdrestore:: noticeDetail).
threeButtonDetailGeo() #
The three-button detail's geometry.
- Parameters
-
Name Meaning layout The active display layout.
- Returns
- The header height, the text column's edge and the touch rects.
threeButtonHeaderShape() #
The three-button detail's header as far as geometry goes: its title, and on the touch-control boards the back chip.
- Parameters
-
Name Meaning layout The active display layout.
- Returns
- The header props, with no status cluster.
totpEpaperStepKey() #
A key that changes exactly when an e-paper TOTP row must repaint.
It moves on at every kEpaperTotpStepSec step into a window and at every window roll, and never goes back, so a sum of keys over several rows changes whenever any one of them does.
- Parameters
-
Name Direction Meaning epoch in Unix time in seconds. period in Window length in seconds (read through kleidos:: totp:: clampPeriod).
- Returns
- The step count since the epoch, counted per window.
totpRowNeedsRefresh() #
Whether a cached row code must be re-generated for epoch.
A never-loaded row always refreshes; a loaded row refreshes only when the step index rolled past the cached one.
- Parameters
-
Name Direction Meaning loaded in True when the row holds a previously generated code. cachedStep in Step index the cached code was generated for. epoch in Current Unix time in seconds. period in Row window length in seconds.
- Return values
-
Value Meaning true The cached code is stale (or absent) — regenerate. false The cached code is still the current window's code.
totpSharedPeriod() #
The period most of periods share, the first one on a tie.
The TOTP list shows one countdown for the rows that share it and keeps a ring of their own only on the rows that do not.
- Parameters
-
Name Direction Meaning periods in The periods of the rows on screen (each read through kleidos:: totp:: clampPeriod).
- Returns
- The shared period; kleidos::
totp:: kPeriod30 for an empty list.
totpStepIndex() #
RFC 6238 step index (epoch / period) of a TOTP window.
- Parameters
-
Name Direction Meaning epoch in Unix time in seconds. period in Window length in seconds (read through kleidos:: totp:: clampPeriod).
- Returns
- The step counter the code is derived from.
totpSteppedRemaining() #
Seconds left in a window, floored to a whole e-paper step.
Floors rather than rounds, so a countdown that moves in steps never shows more time than is left.
- Parameters
-
Name Direction Meaning remaining in Seconds left in the current window.
- Returns
remainingfloored to a multiple of kEpaperTotpStepSec.
vaultFilterMatches() #
Case-insensitive substring test of filter against name.
ASCII-lowercases both operands on the fly (no allocation, no locale). An empty or null filter matches everything (the unfiltered list); a null name matches nothing.
- Parameters
-
Name Direction Meaning name in Candidate display name (NUL-terminated). filter in Query buffer (NUL-terminated); empty ⇒ match all.
- Return values
-
Value Meaning true filteroccurs as a substring ofname(case-insensitive).false No match.
vaultHasSavedNetwork() #
Whether the unlocked vault holds at least one saved Wi-Fi network.
Reads only the count; no network record is decrypted into the caller's memory. Mounts the vault store for the read.
- Parameters
-
Name Direction Meaning ctx in Application context (the unlocked vault's key).
- Returns
- True when at least one network is stored; false while the vault is locked or the store cannot be read.
vaultModified() #
Whether the vault on flash still holds what it held before the restore.
The load-bearing question for the user-facing report, so it is answered by naming the outcomes that DID write rather than by excluding the ones that did not: a new outcome then reads as untouched until someone decides otherwise, which is the safe direction for the callers that relock the session and file a wipe record on a true.
- Parameters
-
Name Direction Meaning status in Outcome of a .kexp restore.
- Return values
-
Value Meaning true The vault was rewritten (fully or partly). false Nothing was written.
vaultTabActionLabel() #
The label an Actions-tab row reads.
- Parameters
-
Name Direction Meaning action in The row's action.
- Returns
- Its string id (the settings title for actions that are not tab rows).
vaultTabActions() #
The Actions-tab rows of a board.
- Parameters
-
Name Direction Meaning hasLockKey in True when the board has a dedicated lock key.
- Returns
- Every row, without the trailing Lock row when
hasLockKey.
Variable Documentation
kBrandCacheLen #
Domain cache length per credential (bytes, NUL included).
Fitted to the only value ever stored here: the index's domain column, an InplaceString<kleidos:: of 24 characters, so 25 bytes hold it whole. The static_assert in the implementation pins the relation. Each byte here is kMaxCredentials bytes of static DRAM.
kDetailFooterReserveH #
Reserved footer-shelf band height used to size the content safe-area above the action bar: a fixed 26 px band, so the content geometry is the same whatever ui::
kEpaperTotpStepSec #
Seconds between the steps of an e-paper TOTP countdown: a 1-bit panel shows the time left in whole steps instead of refreshing every second.
kNoticeDetailBytes #
Bytes the line under a restore's headline is built in, NUL included: the most a notice's detail keeps (popup::
kPanelMaxChoices #
Most choices the keyboard panel's picker popover holds (the longest list is the keyboard layouts).
kValueRowsMax #
Most lines one value of a credential card (the username, the host or URL, the "Also stored" sentence) takes before its last line is cut.
kVaultFilterMaxLen #
Maximum characters retained in the type-to-filter query buffer.
Names are at most kMaxNameLen (32) chars; a query longer than the longest name can never match, so this cap only bounds the buffer and the on-screen echo — it never hides a reachable credential.
s_ credRowCache #
The one session row cache, stored out of line so its PLACEMENT can be decided independently of its owner.
HomeStateHandler holds this by reference. It cannot be a plain member: a section attribute applies to a whole VARIABLE, never to one member, so parking the cache in external RAM as a member would have required tagging the enclosing handler — which also owns the decrypted credential detail buffer (password + notes + embedded TOTP secret), the change-PIN wizard's new PIN and the masked text editor's WiFi passphrase. Splitting the capacity-scaled caches out keeps the external-RAM offload limited to list-surface plaintext.
- Warning
- SECURITY: origin domains only. Never widen this cache with password, PIN, passphrase or TOTP-secret material: the cache may sit in external RAM, which leaves the die.
- See also
- wipeCredRowCache, CredRowCache::
reset
s_ narrowMenuItems #
Backing store for NarrowVaultView::.
Out of line, and held by reference by the view, so this ONE variable carries the external-RAM placement instead of the enclosing HomeStateHandler: a section attribute applies to a whole variable, and the handler also owns the decrypted credential detail buffer, the change-PIN wizard and the masked text editor, none of which may leave the die. The descriptors themselves hold only pointers into already list-surface storage (entry names, the domain cache) plus render flags — no string storage, no secret.
- See also
- s_
credRowCache, KLEIDOS_ EXT_ RAM_ BSS_ DEFINE
s_ wideMenuItems #
Backing store for WideVaultView::.
Same rationale, security boundary and lifetime as s_. A separate variable per layout, and only the one the board declared is linked: a narrow board never carries this array and a wide board never carries the narrow one.