g4 / crypto
crypto - encryption php library
Installs: 51 040
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 9
Forks: 1
Open Issues: 0
Requires
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is auto-updated.
Last update: 2024-11-29 05:14:51 UTC
README
crypto - php library
Install
Via Composer
composer require g4/crypto
Usage
OpenSSL extension
<?php use G4\Crypto\Crypt; use G4\Crypto\Adapter\OpenSSL; $crypto = new Crypt(new OpenSSL()); $crypto->setEncryptionKey('tHi5Is'); $encryptedMessage = $crypto->encode('new message'); $message = $crypto->decode($encryptedMessage);
Mcrypt extension - obsolete
<?php use G4\Crypto\Crypt; use G4\Crypto\Adapter\Mcrypt; $crypto = new Crypt(new Mcrypt()); $crypto->setEncryptionKey('tHi5Is'); $encryptedMessage = $crypto->encode('new message'); $message = $crypto->decode($encryptedMessage);
Development
Install dependencies
$ composer install
Run tests
$ make integration-tests
License
(The MIT License) see LICENSE file for details...