Standard library / hash/adler32
hash/adler32.Checksum()
Compute Adler-32 using two accumulated sums modulo 65521. Useful for matching ZLIB checksums, not authenticating data. This is not a cryptographic authentication primitive. Expected stdout: '11e60398\n'.
Formal Syntax & Structure
go syntaxgo
func Checksum(data []byte) uint32Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| data | []byte | Bytes whose checksum is computed. |
Return Value
uint32
32-bit unsigned checksum.
Working Example
Example Snippetgo
package main
import ( "fmt" "hash/adler32")
func main() { fmt.Printf("%08x\n", adler32.Checksum([]byte("Wikipedia"))) }