code: public String generateSecureRandomId() {
          try {
              val random = new HexRandomStringGenerator(RANDOM_ID_SIZE);
              val hex = random.getNewString();
              if (StringUtils.isBlank(hex)) {
                  throw new IllegalArgumentException("Could not generate a secure random id based on " + random.getAlgorithm());
              }
              return '_' + hex;
          } catch (final Exception e) {
              throw new IllegalStateException("Cannot create secure random ID generator for SAML message IDs.", e);
          }
      }
docs: Generate a secure random id.
  
  @return the secure id string