public class OctetSequenceKeyGenerator extends JWKGenerator<OctetSequenceKey>
Modifier and Type | Field and Description |
---|---|
static int |
MIN_KEY_SIZE_BITS
The minimum size of generated keys.
|
Constructor and Description |
---|
OctetSequenceKeyGenerator(int size)
Creates a new octet sequence JWK generator.
|
Modifier and Type | Method and Description |
---|---|
OctetSequenceKey |
generate()
Generates the JWK according to the set parameters.
|
OctetSequenceKeyGenerator |
secureRandom(SecureRandom secureRandom)
Sets the secure random generator to use.
|
algorithm, keyID, keyIDFromThumbprint, keyOperations, keyStore, keyUse
public static final int MIN_KEY_SIZE_BITS
public OctetSequenceKeyGenerator(int size)
size
- The key size, in bits. Must be at least 112 bits long
for sufficient entropy.public OctetSequenceKeyGenerator secureRandom(SecureRandom secureRandom)
secureRandom
- The secure random generator to use, null
to use the default one.public OctetSequenceKey generate() throws JOSEException
JWKGenerator
generate
in class JWKGenerator<OctetSequenceKey>
JOSEException
- If the key generation failed.Copyright © 2021 Connect2id Ltd.. All rights reserved.