Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raph6/enkryptor
composer package for encryption using openssl
https://github.com/raph6/enkryptor
composer encryption openssl php
Last synced: about 2 months ago
JSON representation
composer package for encryption using openssl
- Host: GitHub
- URL: https://github.com/raph6/enkryptor
- Owner: raph6
- Created: 2020-01-23T20:35:15.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-08T06:30:52.000Z (over 3 years ago)
- Last Synced: 2024-04-18T05:21:49.504Z (9 months ago)
- Topics: composer, encryption, openssl, php
- Language: PHP
- Homepage:
- Size: 14.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Enkryptor
composer package for encryption using openssl### Installation
```shell
composer require raph6/enkryptor
```### How to use
```php
use raph6\Enkryptor\Enkryptor;# encryption
$encrypted = Enkryptor::encrypt('string to encrypt', 'password');
var_dump($encrypted);# decryption
$decrypted = Enkryptor::decrypt($encrypted, 'password');
var_dump($decrypted);
```### Changing cipher method
By default cipher is AES 256 CBC, you can change this by adding a 3rd parameters, for exemple :
```php
$encrypted = Enkryptor::encrypt('test', 'password', 'des-ede3-cfb1');
var_dump($encrypted);$decrypted = Enkryptor::decrypt($encrypted, 'password', 'des-ede3-cfb1');
var_dump($decrypted);
```
You can get available cipher methods by using
```php
var_dump(Enkryptor::cipherList());
```