aboutsummaryrefslogtreecommitdiff
path: root/internal/adler32/adler32_fallback.go
blob: c213c3c164833684ab0e1ca6e2b1279ca14f4b24 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//go:build (!arm64 && !amd64) || purego

package adler32

import (
	"hash"
	"hash/adler32"
)

// The size of an Adler-32 checksum in bytes.
const Size = 4

// New returns a new hash.Hash32 computing the Adler-32 checksum.
func New() hash.Hash32 {
	return adler32.New()
}

// Checksum returns the Adler-32 checksum of data.
func Checksum(data []byte) uint32 { return adler32.Checksum(data) }