lthash

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2022 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

View Source
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.

Functions

This section is empty.

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL