Class OptionUtils

java.lang.Object
com.nimbusds.jose.crypto.opts.OptionUtils

public class OptionUtils extends Object
Utilities for processing JOSE options.
Version:
2025-07-17
Author:
Vladimir Dzhuvinov
  • Constructor Details

  • Method Details

    • optionIsPresent

      @Deprecated public static <T extends Option> boolean optionIsPresent(Set<? extends Option> opts, Class<T> tClass)
      Deprecated.
      Returns true if the specified set of options contains an instance of a class implementing JWSSignerOption.
      Parameters:
      opts - The options set, may be null.
      tClass - The class. Must not be null.
      Returns:
      true if an option is present, else false.
    • ensureMinRSAPrivateKeySize

      public static void ensureMinRSAPrivateKeySize(PrivateKey privateKey, Set<? extends Option> opts)
      Throws an IllegalArgumentException if the size of the specified RSA private key shorter than the minimum required.
      Parameters:
      privateKey - The RSA private key. Must not be null.
      opts - The options. Must not be null.