Class KeyGenerator
java.lang.Object
com.mastercard.developer.oauth2.keys.KeyGenerator
Utility class for generating RSA or EC key pairs.
-
Method Summary
Modifier and TypeMethodDescriptionstatic KeyPairgenerateEcKeyPair(String curveName) Generates an EC key pair with the specified curve.static KeyPairgenerateRsaKeyPair(int keySize) Generates an RSA key pair with the specified key size.
-
Method Details
-
generateRsaKeyPair
Generates an RSA key pair with the specified key size.- Throws:
NoSuchAlgorithmException
-
generateEcKeyPair
public static KeyPair generateEcKeyPair(String curveName) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException Generates an EC key pair with the specified curve.
-