Standard library / hash
hash.Hash32
Extends Hash with Sum32, a numeric uint32 digest. Sum32 leaves accumulated input intact. This is not a cryptographic authentication primitive. Expected stdout: 'cbf43926\n'.
Formal Syntax & Structure
go syntaxgo
type Hash32 interface { Hash Sum32() uint32}Working Example
Example Snippetgo
package main
import ( "fmt" "hash" "hash/crc32")
func main() { var h hash.Hash32 = crc32.NewIEEE() h.Write([]byte("123456789")) fmt.Printf("%08x\n", h.Sum32())}