Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lefuturiste/crypt
A simple crypt lib
https://github.com/lefuturiste/crypt
Last synced: 4 days ago
JSON representation
A simple crypt lib
- Host: GitHub
- URL: https://github.com/lefuturiste/crypt
- Owner: lefuturiste
- Created: 2017-12-31T14:00:17.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-25T08:59:38.000Z (over 4 years ago)
- Last Synced: 2024-04-20T17:08:10.153Z (7 months ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Crypt
This is small lib to use symmetric cryptography with php.
## Installation
`composer require lefuturiste/crypt`
## Usage
Simple usage like this:
```php
$crypt = new Lefuturiste\Crypt\Crypt('YOUR_PASSWORD');
$cipher = $crypt->encrypt('YOUR DATA');
$plainText = $crypt->decrypt($cipher); //YOUR DATA
```You can change the method in Crypt constructor :
```php
$crypt = new Lefuturiste\Crypt\Crypt('YOUR_PASSWORD', 'AES-128-CFB1');
$cipher = $crypt->encrypt('YOUR DATA');
$plainText = $crypt->decrypt($cipher); //YOUR DATA
```Get list of method available : http://php.net/manual/en/function.openssl-get-cipher-methods.php
## Tests
You can test the lib :
`vendor/bin/phpunit Tests`
## Contribution
This is my own usage, and this is very simple usage of cryptography. This is mostly for my personal usage. But you can reports bug, or others things, it's open source project!
You can contribute by pull request, the common method in GitHub.