Bytes returns a hex-encoded hash of b.
(b []byte)
| 20 | |
| 21 | // Bytes returns a hex-encoded hash of b. |
| 22 | func Bytes(b []byte) string { |
| 23 | h := newHash() |
| 24 | h.Write(b) |
| 25 | return hex.EncodeToString(h.Sum(nil)) |
| 26 | } |
| 27 | |
| 28 | // Bytes6 returns the first 6 characters of the hash of b. |
| 29 | func Bytes6(b []byte) string { |
no test coverage detected