Golang hash/crc64.Update function example
package hash/crc64
Update returns the result of adding the bytes in p to the crc.
Golang hash/crc64.Update function usage example
package main
import (
"fmt"
"hash/crc64"
)
var ECMATable = crc64.MakeTable(crc64.ECMA)
func main() {
csum := crc64.Checksum([]byte("abcd"), ECMATable)
fmt.Printf("Checksum : %x\n", csum)
updatedcsum := crc64.Update(csum, ECMATable, []byte("defg"))
fmt.Printf("Updated checksum : %x\n", updatedcsum)
}
Output :
Checksum : 3c9d28596e5960ba
Updated checksum : a4741d7d024ef7b4
Reference :
Advertisement
Something interesting
Tutorials
+17k Golang : XML to JSON example
+23.6k Golang : minus time with Time.Add() or Time.AddDate() functions to calculate past date
+20.9k Golang : Convert PNG transparent background image to JPG or JPEG image
+17.2k Google Chrome : Your connection to website is encrypted with obsolete cryptography
+37.7k Golang : Comparing date or timestamp
+10k Golang : Setting variable value with ldflags
+17.7k Golang : Read data from config file and assign to variables
+25.4k Golang : Generate MD5 checksum of a file
+16.4k Golang : Test floating point numbers not-a-number and infinite example
+5k Python : Convert(cast) bytes to string example
+22.8k Golang : untar or extract tar ball archive example
+5.8k Cash Flow : 50 days to pay your credit card debt