$generator = new KeyGenerator();
$privateKey = $generator->generate();
$generator = new KeyGenerator();
$generator->setBits(2048);
$privateKey = $generator->generate();
$privateKey = PrivateKey::loadFromFileName('privatekey.pem');
$encrypted = $privateKey->encrypt('Hello World');
$publicKey = $privateKey->getPublicKey();
$publicKey->decrypt($encrypted);
Show dependencies of blar/openssl on gemnasium
$ composer require blar/openssl
$ git clone https://github.com/blar/openssl.git