Revision 5216b87ab3a5d85c9adea4424de043a5bc2b6e97 authored by M. J. Fromberger on 13 October 2021, 23:37:50 UTC, committed by Callum Waters on 09 November 2022, 15:31:53 UTC
This patch was needed to pass the buf breakage check for the proto file removed
in #7121, but now that master contains the change we no longer need the patch.
1 parent 58b5209
Raw File
byteslice.go
package bytes

// Fingerprint returns the first 6 bytes of a byte slice.
// If the slice is less than 6 bytes, the fingerprint
// contains trailing zeroes.
func Fingerprint(slice []byte) []byte {
	fingerprint := make([]byte, 6)
	copy(fingerprint, slice)
	return fingerprint
}
back to top