2017 © Pedro Peláez
 

library openssl

OpenSSL for PHP

image

blar/openssl

OpenSSL for PHP

  • Monday, January 2, 2017
  • by blar
  • Repository
  • 1 Watchers
  • 6 Stars
  • 55 Installations
  • PHP
  • 2 Dependents
  • 2 Suggesters
  • 4 Forks
  • 0 Open issues
  • 1 Versions
  • 2 % Grown

The README.md

License Latest Stable Version Build Status Coverage Status Dependency Status Flattr, (*1)

OpenSSL for PHP

Examples

Private Key

Create a new private key

$generator = new KeyGenerator();
$privateKey = $generator->generate();

Create a new private key with 2048 bit

$generator = new KeyGenerator();
$generator->setBits(2048);
$privateKey = $generator->generate();

Load an existing private key from file

$privateKey = PrivateKey::loadFromFileName('privatekey.pem');

Encrypt data with the private key.

$encrypted = $privateKey->encrypt('Hello World');

Get public key from private key.

$publicKey = $privateKey->getPublicKey();

Decrypt data with the public key

$publicKey->decrypt($encrypted);

Installation

Dependencies

Show dependencies of blar/openssl on gemnasium, (*2)

Installation per Composer

$ composer require blar/openssl

Installation per Git

$ git clone https://github.com/blar/openssl.git

The Versions

02/01 2017

dev-master

9999999-dev https://github.com/blar/openssl/

OpenSSL for PHP

  Sources   Download

LGPL-3.0+

The Requires

 

The Development Requires

by Andreas Treichel

php openssl