Browse Source

common: Fingerprint comment

pull/1842/head
Ethan Buchman 7 years ago
parent
commit
9a2438e0dc
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      common/byteslice.go

+ 3
- 0
common/byteslice.go View File

@ -4,6 +4,9 @@ import (
"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)


Loading…
Cancel
Save