code: public int digest(byte[] buf, int offset, int len) throws DigestException {
          if (buf == null) {
              throw new IllegalArgumentException("No output buffer given");
          }
          if (buf.length - offset < len) {
              throw new IllegalArgumentException
                  ("Output buffer too small for specified offset and length");
          }
          int numBytes = engineDigest(buf, offset, len);
          state = INITIAL;
          return numBytes;
      }
docs: Completes the hash computation by performing final operations
  such as padding. The digest is reset after this call is made.
  
  @param buf output buffer for the computed digest
  
  @param offset offset into the output buffer to begin storing the digest
  
  @param len number of bytes within buf allotted for the digest
  
  @return the number of bytes placed into {@code buf}
  
  @exception DigestException if an error occurs.