public class RSAKeyGenerator extends JWKGenerator<RSAKey>
| Modifier and Type | Field and Description |
|---|---|
static int |
MIN_KEY_SIZE_BITS
The minimum size of generated keys.
|
| Constructor and Description |
|---|
RSAKeyGenerator(int size)
Creates a new RSA JWK generator.
|
RSAKeyGenerator(int size,
boolean allowWeakKeys)
Creates a new RSA JWK generator.
|
| Modifier and Type | Method and Description |
|---|---|
RSAKey |
generate()
Generates the JWK according to the set parameters.
|
algorithm, keyID, keyIDFromThumbprint, keyOperations, keyStore, keyUsepublic static final int MIN_KEY_SIZE_BITS
public RSAKeyGenerator(int size)
size - The RSA key size, in bits. Must be at least 2048 bits
long for sufficient strength.public RSAKeyGenerator(int size, boolean allowWeakKeys)
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.public RSAKey generate() throws JOSEException
JWKGeneratorgenerate in class JWKGenerator<RSAKey>JOSEException - If the key generation failed.Copyright © 2021 Connect2id Ltd.. All rights reserved.