code: protected int engineDigest(byte[] buf, int offset, int len)
                                                  throws DigestException {
  
          byte[] digest = engineDigest();
          if (len < digest.length)
                  throw new DigestException("partial digests not returned");
          if (buf.length - offset < digest.length)
                  throw new DigestException("insufficient space in the output "
                                            + "buffer to store the digest");
          System.arraycopy(digest, 0, buf, offset, digest.length);
          return digest.length;
      }
docs: Completes the hash computation by performing final
  operations such as padding. Once {@code engineDigest} has
  been called, the engine should be reset (see
  {@link #engineReset() engineReset}).
  Resetting is the responsibility of the
  engine implementor.
  
  This method should be abstract, but we leave it concrete for
  binary compatibility.  Knowledgeable providers should override this
  method.
  
  @param buf the output buffer in which to store the digest
  
  @param offset offset to start from in the output buffer
  
  @param len number of bytes within buf allotted for the digest.
  Both this default implementation and the SUN provider do not
  return partial digests.  The presence of this parameter is solely
  for consistency in our API's.  If the value of this parameter is less
  than the actual digest length, the method will throw a DigestException.
  This parameter is ignored if its value is greater than or equal to
  the actual digest length.
  
  @return the length of the digest stored in the output buffer.
  
  @exception DigestException if an error occurs.
  
  @since 1.2