code: public static void getClassDigest(Class<?> cl, MessageDigest digest) {
      DigestOutputStream out = new DigestOutputStream(NullOutputStream.getInstance(), digest);
      try {
        writeClassToStream(cl, out);
      } catch (IOException e) {
        e.printStackTrace();
        throw new UnexpectedException(e);
      }
    }
docs: Computes a digest from a class' bytecode.
  @param cl The <code>Class</code> for which to compute the digest.
  @param digest The <code>MessageDigest</code> to update.