|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
#include "mod_password/PasswordModule.h"#include "mod_password/PasswordStore.h"#include "cdc_core/ModuleRegistry.h"#include "cdc_core/StringUtils.h"#include "cdc_core/TropicStorage.h"#include "cdc_ui/BackupImport.h"#include "cdc_core/IKeyboardProvider.h"#include "cJSON.h"#include "cdc_hal/ISecureElement.h"#include "esp_random.h"#include "cdc_ui/I18n.h"#include "cdc_ui/ViewStack.h"#include "cdc_views/ListView.h"#include "cdc_views/ContextMenuView.h"#include "cdc_views/T9InputView.h"#include "cdc_views/InfoView.h"#include "cdc_views/ConfirmView.h"#include "cdc_views/ToastView.h"#include "serial_cmd/ICommandRegistry.h"#include "serial_cmd/SubCommand.h"#include "serial_cmd/Console.h"#include "cdc_log.h"#include "esp_attr.h"#include <cctype>#include <cstring>#include <strings.h>#include <new>#include <memory>#include <cstdio>Go to the source code of this file.
Classes | |
| struct | cdc::mod_password::WizardState |
Namespaces | |
| namespace | cdc |
| namespace | cdc::mod_password |
Functions | |
| static void | cdc::mod_password::registerStrings () |
| static bool | cdc::mod_password::isValidSlot (uint16_t slot) |
| Validates that a slot number is within the configured password range. | |
| static void | cdc::mod_password::cmd_password_list (const char *args) |
| Serial command handler listing all password entries. | |
| static void | cdc::mod_password::cmd_password_get (const char *args) |
| Serial command handler printing one password entry by index. | |
| static bool | cdc::mod_password::isPlaceholder (const char *s) |
| Serial command handler adding one password entry. | |
| static void | cdc::mod_password::generateRandomPassword (char *out, size_t outSize) |
| Generates a 16-character random password from charset a-zA-Z0-9$!%=. | |
| static void | cdc::mod_password::cmd_password_add (const char *args) |
| static void | cdc::mod_password::cmd_password_edit (const char *args) |
| Serial command handler editing one field of a password entry. Usage: PASSWORD_EDIT <index> <field> <new value...> Field: title | username | password | url | totp | notes. | |
| static void | cdc::mod_password::cmd_password_del (const char *args) |
| Serial command handler deleting one password entry by index. | |
| static void | cdc::mod_password::cmd_password (const char *args) |
| static void | cdc::mod_password::registerCommands () |
| Registers serial commands exposed by the password module. | |
| static void | cdc::mod_password::freeListBuffers () |
| Releases dynamic buffers used by the password list view. | |
| static bool | cdc::mod_password::ensureListBuffers () |
| Ensures list and entry buffers are allocated for current store capacity. | |
| static void | cdc::mod_password::rebuildList () |
| Rebuilds password list items from sorted store entries. | |
| static void | cdc::mod_password::onTypePassword (void *userData) |
| Types currently selected password through attached keyboard provider. | |
| static void | cdc::mod_password::showDetails (uint16_t slot) |
| Shows full entry details in the info view for a slot. | |
| static void | cdc::mod_password::wizardFinish () |
| Persists wizard add/edit changes and returns to list view. | |
| static void | cdc::mod_password::pushT9WizardStep (const char *title, const char *initialText, uint16_t maxLen, ui::T9InputView::SaveCallback onSave) |
| Pushes a configured T9 input step for wizard flow. | |
| static void | cdc::mod_password::onWizardTitle (const char *text) |
| Saves title field and advances to username step. | |
| static void | cdc::mod_password::onWizardUsername (const char *text) |
| Saves username field and advances to password step. | |
| static void | cdc::mod_password::onWizardPassword (const char *text) |
| Saves password field; an "x" input generates a random 16-char password via the shared generator. Then advances to URL step. | |
| static void | cdc::mod_password::onWizardUrl (const char *text) |
| Saves URL field and advances to optional TOTP slot step. | |
| static void | cdc::mod_password::onWizardTotp (const char *text) |
| Validates and saves optional TOTP slot, then advances to notes step. | |
| static void | cdc::mod_password::onWizardNotes (const char *text) |
| Saves notes field and completes wizard persistence. | |
| static void | cdc::mod_password::wizardStart () |
| Starts add-entry wizard with empty fields. | |
| static void | cdc::mod_password::wizardEdit (uint16_t slot) |
| Starts edit-entry wizard prefilled with existing slot data. | |
| static void | cdc::mod_password::onMenuView () |
| Opens details view for currently active entry. | |
| static void | cdc::mod_password::onMenuEdit () |
| Opens edit wizard for currently active entry. | |
| static void | cdc::mod_password::onMenuDeleteConfirm (void *userData) |
| Confirmation callback deleting selected entry slot. | |
| static void | cdc::mod_password::onMenuDelete () |
| Opens delete confirmation dialog for currently active entry. | |
| static void | cdc::mod_password::onListMenu (uint16_t index, void *userData) |
| Opens contextual action menu for selected list entry. | |
| static void | cdc::mod_password::onListSelect (uint16_t index, void *userData) |
| Handles direct selection from list view (view existing or add new). | |
| static bool | cdc::mod_password::importPasswordEntry (const cJSON *je, void *user) |
| Maps and upserts one vault entry from its JSON representation. | |
| void | mod_password_register () |
| Registers password module initializer in global module registry. | |
| const char * | cdc::mod_password::skipSpaces (const char *s) |
| Advances over leading ASCII whitespace in a C string. | |
| const char * | cdc::mod_password::nextToken (const char *s, char *out, size_t outSize) |
| Extracts one whitespace-delimited token from a string. | |
| void mod_password_register | ( | ) |
Registers password module initializer in global module registry.
Definition at line 1067 of file PasswordModule.cpp.
References cdc::core::ModuleRegistry::instance(), and cdc::core::ModuleRegistry::registerInitializer().
|
static |
Definition at line 31 of file PasswordModule.cpp.