Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rndoom04/encryptor
Encryption and decryption PHP library.
https://github.com/rndoom04/encryptor
decrypt decryption encrypt encryption encryption-decryption nette nette-framework openssl php php-library php7 security
Last synced: about 1 hour ago
JSON representation
Encryption and decryption PHP library.
- Host: GitHub
- URL: https://github.com/rndoom04/encryptor
- Owner: Rndoom04
- License: mit
- Created: 2022-03-02T10:14:41.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-03-02T14:07:20.000Z (over 2 years ago)
- Last Synced: 2024-10-11T19:42:13.892Z (25 days ago)
- Topics: decrypt, decryption, encrypt, encryption, encryption-decryption, nette, nette-framework, openssl, php, php-library, php7, security
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ENCRYPTION AND DECRYPTION
=============Compatible with PHP >= 7.0.
## Install
For PHP version **`>= 7.0`**:
```
composer require Rndoom04/encryptor
```## How to use it
Firstly init the library by simply "use".
```
use Rndoom04\encryptor;
```Load the library and let's encrypt.
```
$string_to_test = "Hello this is a text to encrypt.";
$encryptor = new \Rndoom04\encryptor\encryptor();
$encryptor->setKey("my-secret-key"); // Set key$encrypted_string = $encryptor->encrypt($string_to_test); // Return encrypted string
$decrypted_string = $encryptor->decrypt($encrypted_string); // Encrypted string you can decrypt back to plain string
```