Files
amethyst/quartz/src/androidDeviceTest
Claude 7b91dd234e fix(quartz): NIP-44 integer padding math, strict extended prefix, payload cap
- calcPaddedLen used Float math and returned wrong buckets above 2^24
  (20971520 -> 25165824, 33554432 -> 41943040) and overflowed Int past
  2^30. It is now integer-only on Long, as the spec requires.
- unpad rejects an extended [0,0][u32] prefix whose length is < 65536, so a
  short message has a single valid encoding.
- decodePayload enforces a configurable maximum (default 64M chars) before
  base64 decoding, and rejects payloads that decode to fewer than 99 bytes.
- Nip44 reads only the first base64 quantum to find the version byte.
- Adds the spec's 65535/65536/65537-byte vectors and padding tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MGR1u8SyzcUuekub39SBsc
2026-09-27 17:18:38 +00:00
..
2026-02-08 16:33:39 -05:00