code: @Sensitive
      @Trivial
      protected static String digest(@Sensitive String input, @Sensitive String algorithm, String charset) {
          MessageDigest md;
          String output = null;
          if (input != null && input.length() > 0) {
              try {
                  md = MessageDigest.getInstance(algorithm);
                  md.update(input.getBytes(charset));
                  output = Base64Coder.toString(Base64Coder.base64Encode(md.digest()));
              } catch (NoSuchAlgorithmException nsae) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Exception instanciating MessageDigest. The algorithm is " + algorithm + nsae);
                  }
                  throw new RuntimeException("Exception instanciating MessageDigest : " + nsae);
              } catch (UnsupportedEncodingException uee) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Exception converting String object : " + uee);
                  }
                  throw new RuntimeException("Exception converting String object : " + uee);
              }
          }
          return output;
      }
docs: generate hash code by using specified algorithm and character set.
  If there is some error, log the error.