code: public static KeyPair newKeyPair(final Algorithm algorithm, final KeySize keySize)
  		throws NoSuchAlgorithmException, NoSuchProviderException
  	{
  		return newKeyPair(algorithm.getAlgorithm(), keySize.getKeySize());
  	}
docs: Factory method for creating a new {@link KeyPair} from the given algorithm and
  {@link KeySize}
  
  @param algorithm
  the algorithm
  @param keySize
  the key size as enum
  @return the new {@link KeyPair} from the given salt and iteration count
  
  @throws NoSuchAlgorithmException
  is thrown if no Provider supports a KeyPairGeneratorSpi implementation for the
  specified algorithm
  @throws NoSuchProviderException
  is thrown if the specified provider is not registered in the security provider
  list