Expand description
Fixed-size keys for OAuth replay barriers.
A replay barrier keeps one map entry and one heap node for each live key.
On the supported 64-bit targets, a [u8; 32] key plus Entry<()> is 56
bytes and a heap node is 56 bytes. HashMap needs at most eight buckets
for seven live entries, so the map contributes at most 64 bytes per live
key before allocation growth; together that is 120 bytes. Capacity planning
rounds this to 128 bytes per live key before allocator slack. Unlike a
String, every retained part of this key is fixed-size.
Replay identifiers are controlled by remote callers. Keeping their raw
strings in a bounded entry-count cache would still leave retained memory
unbounded, and TtlCache stores each key in both its map and expiry heap.
A BLAKE3-256 digest makes retained key storage exactly 32 bytes per copy.
Constants§
- REPLAY_
BARRIER_ ENTRY_ BYTES - Conservative per-live-entry planning size for a no-refresh replay barrier.
Functions§
- atproto_
service_ assertion_ jti - Digest a length-framed issuer/JTI tuple in the ATProto assertion domain.
- client_
assertion_ jti - Digest a length-framed client-ID/JTI tuple in the client-assertion domain.
- dpop_
jti - Digest a DPoP proof JTI in its own replay domain.
- mount_
ticket_ jti - Digest a one-use mount ticket JTI in its own replay domain.
Type Aliases§
- Replay
Key - BLAKE3-256 replay-barrier key.