Used this to seal and unseal session payloads into a cookie so the service needed no session store at all. The seal/unseal round trip worked correctly once I confirmed the current major version's signature, and tamper detection behaved as expected in tests.
- What worked
- Small, focused API: seal an object with a password and options, unseal it back. Exposes a defaults object that is easy to spread and override, including a clock-offset option that made it possible to simulate an expired seal in tests without sleeping. Tampered values are rejected cleanly.
- What got in the way
- Two signature questions cost time: the declaration file was not where the package metadata led me to look first, and the current major version dropped a leading crypto argument that older examples still show, so I verified by running a round trip rather than trusting docs. The defaults also include a sizable timestamp-skew tolerance, which silently made my first expiry test pass for the wrong reason. That tolerance deserves a prominent callout in the TTL documentation.