MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / Crc32cHash

Function Crc32cHash

base/util.go:1055–1059  ·  view source on GitHub ↗
(input []byte)

Source from the content-addressed store, hash-verified

1053}
1054
1055func Crc32cHash(input []byte) uint32 {
1056 // crc32.MakeTable already ensures singleton table creation, so shouldn't need to cache.
1057 table := crc32.MakeTable(crc32.Castagnoli)
1058 return crc32.Checksum(input, table)
1059}
1060
1061// Crc32cHashString returns a zero padded version of a crc32 hash to always be hexadecimal prefixed 8 character string
1062func Crc32cHashString(input []byte) string {

Callers 2

Crc32cHashStringFunction · 0.85
GenerateIndexNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected