code: @Deprecated
      public static SecretKey generateKey(SignatureAlgorithm alg, SecureRandom random) {
  
          Assert.isTrue(alg.isHmac(), "SignatureAlgorithm argument must represent an HMAC algorithm.");
  
          KeyGenerator gen;
  
          try {
              gen = KeyGenerator.getInstance(alg.getJcaName());
          } catch (NoSuchAlgorithmException e) {
              throw new IllegalStateException("The " + alg.getJcaName() + " algorithm is not available.  " +
                  "This should never happen on JDK 7 or later - please report this to the JJWT developers.", e);
          }
  
          return gen.generateKey();
      }
docs: Generates a new secure-random secret key of a length suitable for creating and verifying HMAC signatures
  according to the specified {@code SignatureAlgorithm} using the specified SecureRandom number generator.  This
  implementation returns secure-random key sizes as follows:
  
  <table> <caption>Key Sizes</caption> <thead> <tr> <th>Signature Algorithm</th> <th>Generated Key Size</th> </tr> </thead> <tbody> <tr>
  <td>HS256</td> <td>256 bits (32 bytes)</td> </tr> <tr> <td>HS384</td> <td>384 bits (48 bytes)</td> </tr> <tr>
  <td>HS512</td> <td>512 bits (64 bytes)</td> </tr> </tbody> </table>
  
  @param alg    the signature algorithm that will be used with the generated key
  @param random the secure random number generator used during key generation
  @return a new secure-random secret key of a length suitable for creating and verifying HMAC signatures according
  to the specified {@code SignatureAlgorithm} using the specified SecureRandom number generator.
  @see #generateKey()
  @see #generateKey(SignatureAlgorithm)
  @since 0.5
  @deprecated since 0.10.0 - use {@link #generateKey(SignatureAlgorithm)} instead.