Source file src/hash/crc64/example_test.go

     1  // Copyright 2026 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package crc64_test
     6  
     7  import (
     8  	"fmt"
     9  	"hash/crc64"
    10  )
    11  
    12  func ExampleChecksum() {
    13  	table := crc64.MakeTable(crc64.ECMA)
    14  	checksum := crc64.Checksum([]byte("Hello, world!"), table)
    15  	fmt.Printf("%016x\n", checksum)
    16  	// Output:
    17  	// 8e59e143665877c4
    18  }
    19  

View as plain text