code: public final int getDigestLength() {
          int digestLen = engineGetDigestLength();
          if (digestLen == 0) {
              try {
                  MessageDigest md = (MessageDigest)clone();
                  byte[] digest = md.digest();
                  return digest.length;
              } catch (CloneNotSupportedException e) {
                  return digestLen;
              }
          }
          return digestLen;
      }
docs: Returns the length of the digest in bytes, or 0 if this operation is
  not supported by the provider and the implementation is not cloneable.
  
  @return the digest length in bytes, or 0 if this operation is not
  supported by the provider and the implementation is not cloneable.
  
  @since 1.2