package lthash

import "github.com/testovoleg/whatsmeow/appstate/lthash"

Package lthash implements a summation based hash algorithm that maintains the integrity of a piece of data over a series of mutations. You can add/remove mutations, and it'll return a hash equal to if the same series of mutations was made sequentially.

Index

Variables

var WAPatchIntegrity = LTHash{[]byte("WhatsApp Patch Integrity"), 128}

WAPatchIntegrity is a LTHash instance initialized with the details used for verifying integrity of WhatsApp app state sync patches.

Types

type LTHash

type LTHash struct {
	HKDFInfo []byte
	HKDFSize uint8
}

func (LTHash) SubtractThenAdd

func (lth LTHash) SubtractThenAdd(base []byte, subtract, add [][]byte) []byte

func (LTHash) SubtractThenAddInPlace

func (lth LTHash) SubtractThenAddInPlace(base []byte, subtract, add [][]byte)

Source Files

lthash.go

Version
v0.0.0-20230731113359-3e87cabb9327 (latest)
Published
Jul 31, 2023
Platform
linux/amd64
Imports
2 packages
Last checked
1 month ago

Tools for package owners.