Standard library / hash/adler32

hash/adler32.New()

Create an incremental Adler-32 hash with initial sum of one. Sum appends a big-endian digest; binary state marshaling is supported. This is not a cryptographic authentication primitive. Expected stdout: '11e60398\n'.

Formal Syntax & Structure

go syntaxgo
func New() hash.Hash32

Return Value

hash.Hash32

Fresh incremental 32-bit hash.

Working Example

Example Snippetgo
package main
import (  "fmt"  "hash/adler32")
func main() {  h := adler32.New()  h.Write([]byte("Wiki"))  h.Write([]byte("pedia"))  fmt.Printf("%x\n", h.Sum(nil))}
Go Reference