public class KeyPairHelper extends Object
KeyPairGenerator class to generate
keys and the KeyPairHelper.KeyAlgorithm to define the algorithm to use in the key generation process.| Modifier and Type | Class and Description |
|---|---|
static class |
KeyPairHelper.KeyAlgorithm
This enumeration represents the asymmetric key algorithms that Absio knowingly supports.
|
| Constructor and Description |
|---|
KeyPairHelper()
Create a KeyPairHelper using the
KeyPairHelper.KeyAlgorithm.DEFAULT algorithm. |
KeyPairHelper(KeyPairHelper.KeyAlgorithm algorithm)
Create a KeyPairHelper using the given
KeyPairHelper.KeyAlgorithm. |
| Modifier and Type | Method and Description |
|---|---|
KeyPair |
generateKeyPair(EllipticCurve curve)
Generate a new asymmetric
KeyPair using the helper's KeyPairHelper.KeyAlgorithm. |
public KeyPairHelper()
throws NoSuchAlgorithmException
KeyPairHelper.KeyAlgorithm.DEFAULT algorithm.NoSuchAlgorithmException - thrown if the algorithm is not supportedpublic KeyPairHelper(KeyPairHelper.KeyAlgorithm algorithm) throws NoSuchAlgorithmException
KeyPairHelper.KeyAlgorithm.algorithm - the algorithm to use for key generationNoSuchAlgorithmException - thrown if the algorithm is not supportedpublic KeyPair generateKeyPair(EllipticCurve curve) throws InvalidAlgorithmParameterException
KeyPair using the helper's KeyPairHelper.KeyAlgorithm.curve - the elliptic curve to initialize the generator withKeyPair of the given curveInvalidAlgorithmParameterException - thrown if the elliptic curve is not supportedCopyright © 2021. All rights reserved.