code: @SuppressWarnings("unused") //used by io.jsonwebtoken.security.Keys
      public static KeyPair generateKeyPair(SignatureAlgorithm alg) {
          Assert.isTrue(alg.isRsa(), "Only RSA algorithms are supported by this method.");
          int keySizeInBits = 4096;
          switch (alg) {
              case RS256:
              case PS256:
                  keySizeInBits = 2048;
                  break;
              case RS384:
              case PS384:
                  keySizeInBits = 3072;
                  break;
          }
          return generateKeyPair(keySizeInBits, DEFAULT_SECURE_RANDOM);
      }
docs: Generates a new RSA secure-randomly key pair suitable for the specified SignatureAlgorithm using JJWT's
  default {@link SignatureProvider#DEFAULT_SECURE_RANDOM SecureRandom instance}.  This is a convenience method
  that immediately delegates to {@link #generateKeyPair(int)} based on the relevant key size for the specified
  algorithm.
  
  @param alg the signature algorithm to inspect to determine a size in bits.
  @return a new RSA secure-random key pair of the specified size.
  @see #generateKeyPair()
  @see #generateKeyPair(int, SecureRandom)
  @see #generateKeyPair(String, int, SecureRandom)
  @since 0.10.0