5.1.0
API
API v5.1.0 — Symmetric, OTP.
- Added endpoint POST /symmetric: encrypts and decrypts text using AES symmetric encryption. Supports
aes-256-gcm(default),aes-256-cbc, andaes-128-gcmalgorithms. Key derivation usesscryptSyncwith a random 16-byte salt. The encrypted output is a self-contained base64 blob carrying the salt, IV, authentication tag (GCM), and ciphertext. - Added endpoint POST /otp: generates and verifies one-time passwords following RFC 4226 (HOTP) and RFC 6238 (TOTP). Compatible with Google Authenticator and Aegis. Supports
sha1,sha256, andsha512algorithms, 6 or 8 digit codes, and 15/30/60 second periods. Pass acounterfor deterministic HOTP mode; omit it for time-based TOTP. Verification applies a ±1 period tolerance window and returns adriftfield. - Fixed version checks in DELETE and PATCH route handlers that were incorrectly rejecting v5 and later versions.
- Corrected alphabetical ordering in
versions.ts,post.ts, andget.ts. - Added section separators (
// ─── Section ───) inchart.ts; added blank lines between private functions inchart.ts. - Reformatted
validateBarLineandvalidatePieDonutfor readability (one check per line, grouped by concern). - Standardized error message casing: all messages now start with an uppercase letter (v4 and v5).