Rust backend: SQLite (WAL mode, 8 tables), vault encryption (Argon2id + AES-256-GCM), settings/connections/credentials services, 19 Tauri command wrappers. 46/46 tests passing. Vue 3 frontend: unlock/create vault flow, Pinia app store, Tailwind CSS v4 dark theme with Wraith branding. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
13 lines
404 B
JavaScript
13 lines
404 B
JavaScript
import { isString } from './isString.js';
|
|
/**
|
|
* Checks if a string is a valid hexadecimal string. If a length is provided, it also checks that
|
|
* the string has that length.
|
|
*/
|
|
export function isHexDecimal(payload, length) {
|
|
if (!isString(payload))
|
|
return false;
|
|
if (!/^[0-9a-fA-F]+$/.test(payload))
|
|
return false;
|
|
return length === undefined || payload.length === length;
|
|
}
|