checksum

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMismatch = errors.New("checksum mismatch error")

ErrMismatch indicates a checksum verification failure due to a derived checksum not being equal to expected checksum

Functions

func GenerateCRC32

func GenerateCRC32(
	payload proto.Marshaler,
	payloadVersion int32,
) (*persistencespb.Checksum, error)

GenerateCRC32 generates an IEEE crc32 checksum on the serilized byte array of the given thrift object. The serialization proto used will be of type thriftRW

func Verify

func Verify(
	payload proto.Marshaler,
	checksum *persistencespb.Checksum,
) error

Verify verifies that the checksum generated from the given thrift object matches the specified expected checksum Return ErrMismatch when checksums mismatch

Types

This section is empty.

Jump to

Keyboard shortcuts

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