Class JsonWebKeyPair.ParameterSpecBuilder
java.lang.Object
de.christofreichardt.json.webkey.JsonWebKey.Builder<JsonWebKeyPair.ParameterSpecBuilder>
de.christofreichardt.json.webkey.JsonWebKeyPair.ParameterSpecBuilder
- Enclosing class:
JsonWebKeyPair
public static class JsonWebKeyPair.ParameterSpecBuilder
extends JsonWebKey.Builder<JsonWebKeyPair.ParameterSpecBuilder>
A
JsonWebKey.Builder for building JsonWebKeyPairs by a provided AlgorithmParameterSpec.
The AlgorithmParameterSpec object will internally be used to create an appropriate KeyPair.- Author:
- Christof Reichardt
-
Constructor Summary
ConstructorsConstructorDescriptionParameterSpecBuilder(AlgorithmParameterSpec algorithmParameterSpec) Creates theJsonWebKeyPair.ParameterSpecBuilderpreconfigured with the givenAlgorithmParameterSpec. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theJsonWebKeyPairwith the configured parameters.withSecureRandom(SecureRandom secureRandom) Indicates theSecureRandominstance to be used when generating theJsonWebKeyPair.Methods inherited from class JsonWebKey.Builder
withKid
-
Constructor Details
-
ParameterSpecBuilder
Creates theJsonWebKeyPair.ParameterSpecBuilderpreconfigured with the givenAlgorithmParameterSpec.- Parameters:
algorithmParameterSpec- the requestedAlgorithmParameterSpec
-
-
Method Details
-
withSecureRandom
Indicates theSecureRandominstance to be used when generating theJsonWebKeyPair.- Parameters:
secureRandom- the to be usedSecureRandominstance- Returns:
- this
JsonWebKeyPair.Builderinstance
-
build
Builds theJsonWebKeyPairwith the configured parameters.- Returns:
- the appropriately configured
JsonWebKeyPairinstance - Throws:
GeneralSecurityException- relayed from the underlying "Java Cryptography Architecture"
-