github.com/pure-x-eth/consensus_tm@v0.0.0-20230502163723-e3c2ff987250/libs/bytes/byteslice.go (about) 1 package bytes 2 3 // Fingerprint returns the first 6 bytes of a byte slice. 4 // If the slice is less than 6 bytes, the fingerprint 5 // contains trailing zeroes. 6 func Fingerprint(slice []byte) []byte { 7 fingerprint := make([]byte, 6) 8 copy(fingerprint, slice) 9 return fingerprint 10 }