Expand description
K-of-N shard reassembly with manifest verification.
Pure domain logic — no I/O, no file system, no async runtime.
Functions§
- arrange_
shards - Reorder extracted shard data into shard slots based on embedded index.
- count_
present - Count how many shards are present (non-None) in a slot array.
- deserialize_
shard - Deserialize a shard from binary produced by
serialize_shard. - serialize_
shard - Serialize a shard to binary:
[index:1][total:1][hmac:32][data_len:4][data:N]. - validate_
shard_ count - Validate that enough shards are present for reconstruction.