@Override
  public void write(int singleByte) throws IOException {
    super.write(singleByte);
    bytesSoFar++;
  }
Computes the hash and returns it along with the size of the bytes written to compute the hash.
The buffer resets after this method is called, so this method should only be called once per
computation.

@return the computed hash and the size of the bytes consumed
jib-core/src/main/java/com/google/cloud/tools/jib/hash/CountingDigestOutputStream.java