Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lablnet/php-encryption
Encryption in PHP.
https://github.com/lablnet/php-encryption
classses decryption encryption fastest free oop openssl php secured sodium
Last synced: about 1 month ago
JSON representation
Encryption in PHP.
- Host: GitHub
- URL: https://github.com/lablnet/php-encryption
- Owner: lablnet
- License: mit
- Created: 2019-02-06T07:15:47.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-11T04:13:23.000Z (almost 4 years ago)
- Last Synced: 2024-10-20T11:51:44.288Z (2 months ago)
- Topics: classses, decryption, encryption, fastest, free, oop, openssl, php, secured, sodium
- Language: PHP
- Homepage:
- Size: 26.4 KB
- Stars: 13
- Watchers: 4
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.com/Lablnet/PHP-Encryption.svg?branch=master)](https://travis-ci.com/Lablnet/PHP-Encryption)
[![StyleCI](https://github.styleci.io/repos/169368362/shield?branch=master)](https://github.styleci.io/repos/169368362)# PHP Encryption
Encryption in PHP.## Requirement
1. PHP 7 (7.3 Recommanded).
2. Composer.
3. openSSL php extension.
4. Sodium php extension for use sodium adapter.## Insallation
Installing this package is very simple, first ensure you have the right PHP version and composer installed then in your terminal/(command prompt) run:
``` composer require lablnet/encryption ```## Encrypt
You can encrypt string by calling to encrypt method```php
encrypt("This is a text");echo $encrypt;
```### Decrypt
You can decrypt token by calling decrypt method```php
decrypt($encrypt);
echo $decrypt;
```### Adapter
This Package support two encryption adapter
- OpenSSL
- SodiumDefault openSSL will use,
you can use any one you want.### change Adapter
You can pass supported adapter to class likeUse of sodium
```php