Hashes the contents of this byte source using the given hash function. @throws IOException if an I/O error occurs while reading from this source
(HashFunction hashFunction)
| 335 | * @throws IOException if an I/O error occurs while reading from this source |
| 336 | */ |
| 337 | public HashCode hash(HashFunction hashFunction) throws IOException { |
| 338 | Hasher hasher = hashFunction.newHasher(); |
| 339 | copyTo(Funnels.asOutputStream(hasher)); |
| 340 | return hasher.hash(); |
| 341 | } |
| 342 | |
| 343 | /** |
| 344 | * Checks that the contents of this byte source are equal to the contents of the given byte |
nothing calls this directly
no test coverage detected