code: protected static MessageDigest prepareMessageDigest(final String principal, final String service) throws NoSuchAlgorithmException {
          val md = MessageDigest.getInstance("SHA");
          if (StringUtils.isNotBlank(service)) {
              md.update(service.getBytes(StandardCharsets.UTF_8));
              md.update(CONST_SEPARATOR);
          }
          md.update(principal.getBytes(StandardCharsets.UTF_8));
          md.update(CONST_SEPARATOR);
          return md;
      }
docs: Prepare message digest message digest.
  
  @param principal the principal
  @param service   the service
  @return the message digest
  @throws NoSuchAlgorithmException the no such algorithm exception