Skip to content

Second wave: JWT public keys and signing, UUID inspect and v5, URL tab - #32

Merged
s12v merged 4 commits into
masterfrom
wave2
Sep 13, 2026
Merged

s12v merged 4 commits into
masterfrom
wave2

Conversation

@s12v

@s12v s12v commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Four commits.

b4be66c JWT

  • update() accepts async elements (a promise of a string or of { value, hint, tone }; a sequence number drops results from superseded updates).
  • Verify RS256/384/512, PS256/384/512, ES256/384/512 and EdDSA with a public key — PEM (SPKI) or JWK / JWKS — via WebCrypto. The JWT tab shows the second text area as Public key; the Secret field stays for HS*.
  • Sign: a JSON object in the input is a payload — Signed token, HS256 signs it with the secret (reproduces the jwt.io example byte for byte).
  • Tests generate RSA, EC P-256 and Ed25519 keys with node:crypto and cover valid, wrong-key, tampered and not-a-key cases.

f889052 UUID

The input is back on the tab. A pasted UUID (dashes or not, braces, urn:uuid:, any case) shows its version with a description, the variant, and for v1 / v6 / v7 the embedded creation time; nil and max are named; a ULID shows its time. Any other text is a name: UUID v5 in the DNS and URL namespaces (checked against Python uuid.uuid5). Generators stay.

bc76651 URL tab

lib/snov/urls.js: scheme, host (Unicode form of an IDN via an RFC 3492 punycode decoder), port (default per scheme), path (decoded), query parameters decoded one per line, fragment, credentials (flagged red), origin, normalized form. A bare host or host:port is read as https with a hint. Popup 780 px so the 16 tabs stay on one row with three header icons.

52b0461 README: one-line standalone link; release example says v2.2.0.

218 tests.

- update() accepts async elements: calculate() may return a promise of a
  string or of { value, hint, tone }; a sequence number drops results
  from superseded updates
- jwt.js: importPublicKey() reads a PEM (SPKI) or a JWK / JWKS and
  verifyAsymmetric() checks RS256/384/512, PS256/384/512, ES256/384/512
  and EdDSA with WebCrypto; the JWT tab shows the second text area as
  'Public key' for that, the Secret field stays for HS*
- a JSON object in the input is a payload: 'Signed token, HS256' signs it
  with the secret (reproduces the jwt.io example byte for byte)
- tests generate RSA, EC P-256 and Ed25519 keys with node:crypto and check
  valid, wrong-key, tampered and not-a-key cases
The input is back on the UUID tab. A pasted UUID (any spelling: dashes
or not, braces, urn:uuid:, upper case) shows its version with a
description, the variant, and for v1 / v6 / v7 the embedded creation
time; nil and max UUIDs are named; a ULID shows its time. Any other text
is a name: UUID v5 in the DNS and URL namespaces (checked against
Python's uuid.uuid5). The v4 / v7 / ULID generators stay.
lib/snov/urls.js on the URL API: scheme, host (with the Unicode form of
an IDN via an RFC 3492 punycode decoder), port (default per scheme in
the hint), path (decoded in the hint), query parameters decoded one per
line, fragment, credentials (flagged red), origin, normalized form. A
bare host or host:port is read as https, with a hint saying so. The
popup grows to 780 px and tab labels get 1 px less padding so the 16
tabs stay on one row with the three header icons.
@s12v
s12v merged commit 9a0d01c into master Sep 13, 2026
1 check passed
@s12v
s12v deleted the wave2 branch September 13, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant