Class CertReqUtils


  • public class CertReqUtils
    extends Object
    Author:
    stefan
    • Constructor Detail

      • CertReqUtils

        public CertReqUtils()
    • Method Detail

      • 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 use
        bits - the length of the key (modulus) in bits
        Returns:
        the KeyPair
        Throws:
        NoSuchAlgorithmException - if no KeyPairGenerator is available for the requested algorithm