Class RSAKeyGenerator


  • public class RSAKeyGenerator
    extends JWKGenerator<RSAKey>
    RSA JSON Web Key (JWK) generator.
    Version:
    2023-01-29
    Author:
    Vladimir Dzhuvinov, Justin Cranford
    • Field Detail

      • MIN_KEY_SIZE_BITS

        public static final int MIN_KEY_SIZE_BITS
        The minimum size of generated keys.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RSAKeyGenerator

        public RSAKeyGenerator​(int size)
        Creates a new RSA JWK generator.
        Parameters:
        size - The RSA key size, in bits. Must be at least 2048 bits long for sufficient strength.
      • RSAKeyGenerator

        public RSAKeyGenerator​(int size,
                               boolean allowWeakKeys)
        Creates a new RSA JWK generator.
        Parameters:
        size - The RSA key size, in bits. Must be at least 2048 bits long for sufficient strength.
        allowWeakKeys - true to allow generation of keys shorter than 2048 bits.