Package se.idsec.utils.printcert.utils
Class CertReqUtils
- java.lang.Object
-
- se.idsec.utils.printcert.utils.CertReqUtils
-
public class CertReqUtils extends Object
- Author:
- stefan
-
-
Constructor Summary
Constructors Constructor Description CertReqUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeyPairgenerateKeyPair(String algorithm, int bits)Generate a KeyPair using the specified algorithm with the given size.static X500NamegetDn(Map<SubjectDnType,String> nameMap)
-
-
-
Method Detail
-
getDn
public static X500Name getDn(Map<SubjectDnType,String> nameMap)
-
generateKeyPair
public static KeyPair generateKeyPair(String algorithm, int bits) throws NoSuchAlgorithmException
Generate a KeyPair using the specified algorithm with the given size.- Parameters:
algorithm- the algorithm to usebits- the length of the key (modulus) in bits- Returns:
- the KeyPair
- Throws:
NoSuchAlgorithmException- if no KeyPairGenerator is available for the requested algorithm
-
-