docs: public String generateDigest(String algorithmName, X509Certificate cert) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.entry(tc, "generateDigest: " + algorithmName);
  
          String rc = null;
          if (cert != null) {
              try {
                  MessageDigest md = MessageDigest.getInstance(algorithmName);
                  md.update(cert.getEncoded());
                  byte data[] = md.digest();
                  StringBuilder buffer = new StringBuilder(3 * data.length);
                  int i = 0;
                  buffer.append(HEX_CHARS[(data[i] >> 4) & 0xF]);
                  buffer.append(HEX_CHARS[(data[i] % 16) & 0xF]);
                  for (++i; i < data.length; i++) {
                      buffer.append(':');
                      buffer.append(HEX_CHARS[(data[i] >> 4) & 0xF]);
                      buffer.append(HEX_CHARS[(data[i] % 16) & 0xF]);
                  }
                  rc = buffer.toString();
              } catch (NoClassDefFoundError e) {
                  // no ffdc needed, this is for PAC.
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      Tr.debug(tc, "Error finding a class: " + e);
              } catch (Exception e) {
                  FFDCFilter.processException(e, getClass().getName(), "generateDigest", this);
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      Tr.debug(tc, "Error generating digest: " + e);
              }
          } else {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "Ignoring null certificate");
              }
          }
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.exit(tc, "generateDigest: " + rc);
          return rc;
      }