code: public KeyPair generateKeyPair() throws NoSuchAlgorithmException {
          LOGGER.info("Generating new key pair");
          final KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
          final SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
          keyGen.initialize(4096, random);
          return this.keyPair = keyGen.generateKeyPair();
      }
docs: Generates a key pair.
  
  @return a KeyPair (public / private keys)
  @throws NoSuchAlgorithmException if the algorithm cannot be found
  @since 1.0.0