code: public HashCode hash(HashFunction hashFunction) throws IOException {
      Hasher hasher = hashFunction.newHasher();
      copyTo(Funnels.asOutputStream(hasher));
      return hasher.hash();
    }
docs: 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