Linked-list Truncated Hash for WhatsApp App State integrity verification.
Maintains a 128-byte hash that tracks the state of all applied mutations via pointwise u16 little-endian arithmetic with wrapping.
Matches whatsmeow appstate/lthash/lthash.go.
Summary
Functions
Add MACs to the hash state.
Create a new empty LTHash (128 zero bytes).
Subtract MACs from the hash state.
Subtract old MACs then add new MACs to the hash state.
Functions
Add MACs to the hash state.
@spec new() :: binary()
Create a new empty LTHash (128 zero bytes).
Subtract MACs from the hash state.
Subtract old MACs then add new MACs to the hash state.
Returns updated 128-byte hash.
Matches whatsmeow LTHash.SubtractThenAdd().