Skip to content

Commit f62397b

Browse files
authored
Merge pull request #7 from SIU-Toba/master
composer support & PSR-4
2 parents be5b2a7 + c407aca commit f62397b

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/vendor/

composer.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "ioncube/php-openssl-cryptor",
3+
"description": "Simple to use class for encrypting/decrypting using the PHP Openssl library.",
4+
"type": "library",
5+
"license": "MIT",
6+
"require": {
7+
"ext-openssl": "*"
8+
},
9+
"autoload": {
10+
"psr-4": {
11+
"ioncube\\phpOpensslCryptor\\": "src/"
12+
}
13+
}
14+
}

example.php renamed to examples/example.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
include_once 'cryptor.php';
3+
use ioncube\phpOpensslCryptor\Cryptor;
44

55
$data = 'Good things come in small packages.';
66
$key = '9901:io=[<>602vV03&Whb>9J&M~Oq';

cryptor.php renamed to src/Cryptor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2424
*/
2525

26+
namespace ioncube\phpOpensslCryptor;
27+
2628
class Cryptor
2729
{
2830
private $cipher_algo;

tests/BasicCryptTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require_once __DIR__ . '/../cryptor.php';
3+
use ioncube\phpOpensslCryptor\Cryptor;
44

55
$data = 'Good things come in small packages.';
66
$key = '9901:io=[<>602vV03&Whb>9J&M~Oq';

0 commit comments

Comments
 (0)